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

Re: pg_get_ruledef and extra line breaks

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: pg_get_ruledef and extra line breaks
Date: 2003-09-29 09:14:02
Message-ID: 3F77F7DA.9060109@pse-consulting.de (view raw or flat)
Thread:
Lists: pgsql-hackers
Christopher Kings-Lynne wrote:

>Hi,
>
>I notice that the pretty printing version of pg_get_ruledef inserts extra
>newlines whereas all the others pretty functions (except view defs) do
>not.  In fact, Andreas argued against a version of pg_get_triggerdef()
>that added extra newlines.
>
No, I did not *in general*, but for now because there's no node 
traversing and a pretty formatted query can be easily constructed by 
yourself as for all other non-pg_get_xxx supported objects.


>
> CREATE RULE asdfx AS
>    ON INSERT TO test
>   WHERE 1 = 1 OR 1 = 2 OR 1 = 3 OR 1 = 5 DO INSTEAD NOTHING;
> CREATE RULE asdf AS
>    ON INSERT TO test
>   WHERE 1 = 1 OR 1 = 2 OR 1 = 3 OR 1 = 5 DO INSTEAD NOTHING;
>(8 rows)
>
>
>Are those newlines really necessary?  They seem a bit out of place?
>
Matter of taste. Things look different if action is not NOTHING, but 
something more.

Regards,
Andreas



In response to

Responses

pgsql-hackers by date

Next:From: Christopher Kings-LynneDate: 2003-09-29 09:21:39
Subject: Re: ADD FOREIGN KEY (was Re: [GENERAL] 7.4Beta)
Previous:From: Andreas PflugDate: 2003-09-29 09:04:38
Subject: Re: ADD FOREIGN KEY (was Re: [GENERAL] 7.4Beta)

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