Re: Weird constraint output - Mailing list pgsql-hackers

From Christopher Kings-Lynne
Subject Re: Weird constraint output
Date
Msg-id 07a201c36dd0$06ddf320$2800a8c0@mars
Whole thread Raw
In response to Weird constraint output  (Jeroen Ruigrok/asmodai <asmodai@wxs.nl>)
Responses Re: Weird constraint output
List pgsql-hackers
> Obviously psql uses either use pg_constraint.consrc or
> pg_get_expr(conbin, conrelid) which both will give this lot of
> parentheses, so it's not a bug, but a feature
> For easier reengineering, I invented several pg_get_xxx functions with a
> pretty-print option, which omits this messy parentheses, because I
> noticed how ugly this looks while writing pgAdmin3 (especially for large
> views with many joins and big expressions).
> There have been suggestions to use the pretty-print options for psql (I
> don't know which have been realized so far), and very harsh rejects
> doing this in pg_dump, namely from Tom).

I have changed psql to use pg_get_viewdef(oid, true).  I agree with Tom for
not using it in dumps just yet though.  Is there a function for getting nice
constraint defs?

Chris



pgsql-hackers by date:

Previous
From: Sean Chittenden
Date:
Subject: Re: Bumping block size to 16K on FreeBSD...
Next
From: "Christopher Kings-Lynne"
Date:
Subject: Re: ALTER TABLE