BUG #15356: Inconsistent documentation about CREATE TYPE

Started by PG Bug reporting formabout 8 years ago4 messagesbugs
Beta feature

Hackorum builds and tests every patch posted to the lists, not only commitfest submissions. This is Hackorum's own CI rather than the PostgreSQL project's, and it is still under testing - please report anything that looks wrong.

won't retrysuccessCI history

You can run a PostgreSQL built from this patch straight from Docker, with no checkout and no build:

docker run --rm -p 5432:5432 ghcr.io/hackorum-dev/postgres-patch:t68580
psql -h localhost -U postgres

Built from patchset v2 (message #2), July 27, 2026 at 07:56 PM.

Every patchset is also pushed to a branch of our PostgreSQL fork, so you can check out the same tree CI built. Without a PostgreSQL checkout:

git clone --branch t68580_2 https://github.com/hackorum-dev/postgres.git

In a checkout you already have, add the fork once:

git remote add hackorum https://github.com/hackorum-dev/postgres.git

then, for this patchset and every later one:

git fetch hackorum t68580_2 && git checkout t68580_2

Patchset v2 (message #2) is on t68580_2

Jump to latest
#1PG Bug reporting form
noreply@postgresql.org

The following bug has been logged on the website:

Bug reference: 15356
Logged by: Lukas Eder
Email address: lukas.eder@gmail.com
PostgreSQL version: 10.5
Operating system: Windows
Description:

Hello,

The CREATE TYPE documentation [1]https://www.postgresql.org/docs/current/static/sql-createtype.html specifies that enum types without any enum
labels are possible:

CREATE TYPE name AS ENUM ( [ 'label' [, ... ] ] )

I can confirm this. The following statement works well:

CREATE TYPE e AS ENUM ();

However, further down in the same documentation page, we can see:

"Enum types take a list of one or more quoted labels"

It should read "zero or more quoted labels". I suspect this should be
adapted on all documentation pages from PostgreSQL 9.0 onwards. In 8.4, the
documentation was consistent [2]https://www.postgresql.org/docs/8.4/static/sql-createtype.html

[1]: https://www.postgresql.org/docs/current/static/sql-createtype.html
[2]: https://www.postgresql.org/docs/8.4/static/sql-createtype.html

#2Peter Eisentraut
peter_e@gmx.net
In reply to: PG Bug reporting form (#1)
Re: BUG #15356: Inconsistent documentation about CREATE TYPE

On 28/08/2018 14:56, PG Bug reporting form wrote:

The CREATE TYPE documentation [1] specifies that enum types without any enum
labels are possible:

CREATE TYPE name AS ENUM ( [ 'label' [, ... ] ] )

I can confirm this. The following statement works well:

CREATE TYPE e AS ENUM ();

However, further down in the same documentation page, we can see:

"Enum types take a list of one or more quoted labels"

It should read "zero or more quoted labels". I suspect this should be
adapted on all documentation pages from PostgreSQL 9.0 onwards. In 8.4, the
documentation was consistent [2]

Right. How about the attached patch?

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachments:

t68580_2
0001-doc-Clarify-CREATE-TYPE-ENUM-documentation.patchtext/plain; charset=UTF-8; name=0001-doc-Clarify-CREATE-TYPE-ENUM-documentation.patch; x-mac-creator=0; x-mac-type=0Download+5-3
#3Lukas Eder
lukas.eder@gmail.com
In reply to: Peter Eisentraut (#2)
Re: BUG #15356: Inconsistent documentation about CREATE TYPE

On Tue, Nov 13, 2018 at 10:45 AM Peter Eisentraut <
peter.eisentraut@2ndquadrant.com> wrote:

On 28/08/2018 14:56, PG Bug reporting form wrote:

The CREATE TYPE documentation [1] specifies that enum types without any

enum

labels are possible:

CREATE TYPE name AS ENUM ( [ 'label' [, ... ] ] )

I can confirm this. The following statement works well:

CREATE TYPE e AS ENUM ();

However, further down in the same documentation page, we can see:

"Enum types take a list of one or more quoted labels"

It should read "zero or more quoted labels". I suspect this should be
adapted on all documentation pages from PostgreSQL 9.0 onwards. In 8.4,

the

documentation was consistent [2]

Right. How about the attached patch?

Makes sense, thanks

#4Peter Eisentraut
peter_e@gmx.net
In reply to: Lukas Eder (#3)
Re: BUG #15356: Inconsistent documentation about CREATE TYPE

On 13/11/2018 11:01, Lukas Eder wrote:

The CREATE TYPE documentation [1] specifies that enum types

without any enum

labels are possible:

     CREATE TYPE name AS ENUM ( [ 'label' [, ... ] ] )

I can confirm this. The following statement works well:

     CREATE TYPE e AS ENUM ();

However, further down in the same documentation page, we can see:

     "Enum types take a list of one or more quoted labels"

It should read "zero or more quoted labels". I suspect this should be
adapted on all documentation pages from PostgreSQL 9.0 onwards. In

8.4, the

documentation was consistent [2]

Right.  How about the attached patch?

Makes sense, thanks 

committed

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services