Re: last comma inside "CREATE TABLE ()" statements - Mailing list pgsql-general

From Tom Lane
Subject Re: last comma inside "CREATE TABLE ()" statements
Date
Msg-id 27993.987956509@sss.pgh.pa.us
Whole thread Raw
In response to last comma inside "CREATE TABLE ()" statements  (Louis-David Mitterrand <vindex@apartia.ch>)
Responses Re: last comma inside "CREATE TABLE ()" statements
Re: last comma inside "CREATE TABLE ()" statements
List pgsql-general
Louis-David Mitterrand <vindex@apartia.ch> writes:
> Is it against the SQL standard to accept a trailing comma in a table
> declaration?

Yes ...

> CREATE TABLE "currency" (
>     currency_id varchar(3),
>     rate float, <-------------------- BOOM! parse error
> );

> As in perl, it would make life easier to simply ignore/accept a trailing
> comma on table declarations.

... however, this seems like a reasonable idea that would not introduce
any major problems.  I have no objections, if someone wants to submit
a grammar patch.

            regards, tom lane

pgsql-general by date:

Previous
From: Alex Pilosov
Date:
Subject: Re: last comma inside "CREATE TABLE ()" statements
Next
From: Tom Lane
Date:
Subject: Re: PostgreSQL 7.1 and Sequences