Re: dropping anonymous constraints - Mailing list pgsql-general

From Doug McNaught
Subject Re: dropping anonymous constraints
Date
Msg-id m3d6tmv43m.fsf@varsoon.wireboard.com
Whole thread Raw
In response to Re: dropping anonymous constraints  (Ben Liblit <liblit@eecs.berkeley.edu>)
List 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

pgsql-general by date:

Previous
From: Robert Treat
Date:
Subject: Re: Blank date field.. Help...
Next
From: Andrew Sullivan
Date:
Subject: Re: table size growing out of control