Re: last comma inside "CREATE TABLE ()" statements

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Louis-David Mitterrand <vindex(at)apartia(dot)ch>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: last comma inside "CREATE TABLE ()" statements
Date: 2001-04-22 16:21:49
Message-ID: 27993.987956509@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Louis-David Mitterrand <vindex(at)apartia(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Wall 2001-04-22 16:43:13 Re: Re: Getting milliseconds out of TIMESTAMP
Previous Message Alex Pilosov 2001-04-22 16:08:22 Re: last comma inside "CREATE TABLE ()" statements