Thread

Commits

  1. Doc: fix minor syntax error in example.

  1. BUG #18543: Mistake in docs example

    The Post Office <noreply@postgresql.org> — 2024-07-17T12:53:39Z

    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 ) ] |
    ...
    ```
    
    
  2. Re: BUG #18543: Mistake in docs example

    Tom Lane <tgl@sss.pgh.pa.us> — 2024-07-17T19:03:06Z

    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