Re: Weird constraint output

From: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>
To: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Weird constraint output
Date: 2003-08-29 08:25:45
Message-ID: 3F4F0E09.1000004@pse-consulting.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Christopher Kings-Lynne wrote:

>I have changed psql to use pg_get_viewdef(oid, true). I agree with Tom for
>not using it in dumps just yet though.
>
While there still might be a pg_dump option to do this.

>Is there a function for getting nice constraint defs?
>
Of course there is, use pg_get_constraintdef(text, bool) for this.
pg_get_constraintdef(text, bool)
pg_get_expr(text, oid, bool)
pg_get_indexdef(text, int4, bool)
pg_get_ruledef(text, bool)
pg_get_viewdef(text, bool)
all have the pretty-print bool. Note that pg_get_indexdef's second
parameter selects if the complete definition is returned (=0) or only
that column's definition.

Regards,
Andreas

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Giuseppe Tanzilli - CSF 2003-08-29 09:34:11 pgsql 7.4b2 bug on column defaults?
Previous Message Hannu Krosing 2003-08-29 08:22:11 Re: ALTER TABLE