pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #18543: Mistake in docs example
2+ messages / 2 participants
[nested] [flat]

Commits from this thread:
  2024-07-17 6159331acf 4cbd8c6022  Doc: fix minor syntax error in example.
* BUG #18543: Mistake in docs example
@ 2024-07-17 12:53 PG Bug reporting form <noreply@postgresql.org>
  2024-07-17 19:03 ` Re: BUG #18543: Mistake in docs example Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: PG Bug reporting form @ 2024-07-17 12:53 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: onavratil@monetplus.cz

The following bug has been logged on the website:

Bug reference:      18543
Logged by:          Ondřej Navrátil
Email address:      onavratil@monetplus.cz
PostgreSQL version: 16.3
Operating system:   windows
Description:        

https://www.postgresql.org/docs/17/ddl-identity-columns.html

The second example:

```
CREATE TABLE people (
    id bigint GENERATED BY DEFAULT IDENTITY,
    ...,
);
```

is missing **AS**, correct version:

```
CREATE TABLE people (
    id bigint GENERATED BY DEFAULT AS IDENTITY,
    ...,
);
```

... as per syntax here
https://www.postgresql.org/docs/current/sql-createtable.html
```
...
GENERATED { ALWAYS | BY DEFAULT } AS IDENTITY [ ( sequence_options ) ] |
...
```



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BUG #18543: Mistake in docs example
  2024-07-17 12:53 BUG #18543: Mistake in docs example PG Bug reporting form <noreply@postgresql.org>
@ 2024-07-17 19:03 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2024-07-17 19:03 UTC (permalink / raw)
  To: onavratil@monetplus.cz; +Cc: pgsql-bugs@lists.postgresql.org

PG Bug reporting form <noreply@postgresql.org> writes:
> https://www.postgresql.org/docs/17/ddl-identity-columns.html

> The second example:

> CREATE TABLE people (
>     id bigint GENERATED BY DEFAULT IDENTITY,

> is missing **AS**, correct version:

> CREATE TABLE people (
>     id bigint GENERATED BY DEFAULT AS IDENTITY,

Right you are.  Will fix, thanks for spotting that!

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2024-07-17 19:03 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-07-17 12:53 BUG #18543: Mistake in docs example PG Bug reporting form <noreply@postgresql.org>
2024-07-17 19:03 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox