Skip site navigation (1) Skip section navigation (2)

Re: Weird constraint output

From: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
To: "Andreas Pflug" <pgadmin(at)pse-consulting(dot)de>,"Jeroen Ruigrok/asmodai" <asmodai(at)wxs(dot)nl>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Weird constraint output
Date: 2003-08-29 01:51:10
Message-ID: 07a201c36dd0$06ddf320$2800a8c0@mars (view raw, whole thread or download thread mbox)
Lists: 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?


In response to


pgsql-hackers by date

Next:From: Neil ConwayDate: 2003-08-29 02:02:52
Subject: Re: Nasty problem in hash indexes
Previous:From: Sean ChittendenDate: 2003-08-29 01:03:05
Subject: Re: Bumping block size to 16K on FreeBSD...

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group