Re: dropping anonymous constraints

Doug McNaught <doug@wireboard.com>

From: Doug McNaught <doug@wireboard.com>
To: Ben Liblit <liblit@eecs.berkeley.edu>
Cc: pgsql-general@postgresql.org, Tom Lane <tgl@sss.pgh.pa.us>
Date: 2002-07-17T14:09:01Z
Lists: pgsql-general
Ben Liblit <liblit@eecs.berkeley.edu> writes:

> Tom Lane wrote:
> > Try psql's \d command to check out constraint names.
> 
> That did it.  Thank you for the speedy reply.
> 
> (I can't help but shake my head at the design of ALTER TABLE's constraint
> manipulation facilities, whose non-orthogonality requires one to step
> outside the language and use things like "\d" to accomplish this sort of
> task.  Perhaps when I have more database experience under my belt that
> will feel like less of a kludge.)

'\d' and friends in psql are just shorthand for queries against the
system catalogs.  So you're not "stepping outside the language",
really.  

If you do 'psql -E' you can see the queries generated by the various
backslash commands.

-Doug