From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@commandprompt.com>
Cc: Fujii Masao <masao.fujii@gmail.com>
Cc: pgsql-docs <pgsql-docs@postgresql.org>
Subject: Re: alter-table.sgml and DEFAULT clause
Date: Tue, 28 Dec 2010 10:21:28 -0500
Message-ID: <19458.1293549688@sss.pgh.pa.us> (raw)
In-Reply-To: <1293541749-sup-6741@alvh.no-ip.org>
References: <AANLkTiksnyeJ-+U7Okm=oiqw2jPAbjN1ZoR6-RRMCzi7@mail.gmail.com>
<1293541749-sup-6741@alvh.no-ip.org>
Alvaro Herrera <alvherre@commandprompt.com> writes:
> Excerpts from Fujii Masao's message of mar dic 28 01:26:09 -0300 2010:
>> We seem to have forgotten to add the reference to DEFAULT clause
>> into the following syntax in alter-table.sgml. How about the attached
>> patch?
>>
>> ADD [ COLUMN ] column type [ column_constraint [ ... ] ]
> Hmm, and this works all the way back to 8.2 ...
I wonder whether it would be better to leave ALTER alone and change the
CREATE syntax diagram to fold DEFAULT in as one of the column_constraint
options. The current syntax diagram is flat out wrong, because it
states that DEFAULT must precede any constraint phrase, which isn't so.
Copying that error into the ALTER syntax doesn't seem like a good fix
to me.
Probably the reason it's like it is is that somebody felt that DEFAULT
didn't seem like a kind of constraint. While that doesn't bother me
especially, we could perhaps deal with that objection by renaming the
"column_constraint" nonterminal to some other phrase, like
"column_property" or "column_option".
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: tgl@sss.pgh.pa.us, alvherre@commandprompt.com, masao.fujii@gmail.com
Subject: Re: alter-table.sgml and DEFAULT clause
In-Reply-To: <19458.1293549688@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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