> From: Bruce Momjian [mailto:pgman@candle.pha.pa.us]
> > is (I assume) it would do nothing to help \h ALTER TABLE in
> psql. Maybe
> > a good compromise would be to include the table_constraint
> section of
> > the CREATE TABLE syntax in the ALTER TABLE syntax.
>
> If they created the table, they have already seen the
> constraint syntax.
> I see no reason to repeat it.
The reason I'd repeat it is because when you're going to modify
existing constraints, you'll be using ALTER TABLE. Sure, if the
user memorized the constraint syntax when they created the table,
they won't need extra help. Personally, I usually make use of
column-level constraints when writing DDL, so any time I need to
use table-level syntax I often have to look something up. That's
why I'd like to see the info in \h.
If you look at our docs from a newbie standpoint, they're not very
easy to use, because it's difficult to find stuff unless you know
where to look. If you're looking in the SQL Syntax section, ALTER
TABLE is the obvious choice if you need to change something about
the table, but it's a PITA to have to refer to other documentation
to find the full syntax for the command.
--
Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461