Re: pretty print viewdefs - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: pretty print viewdefs
Date
Msg-id 4A95EFB7.2050901@dunslane.net
Whole thread Raw
In response to Re: pretty print viewdefs  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers

Tom Lane wrote:
> Andrew Dunstan <andrew@dunslane.net> writes:
>   
>> Tom Lane wrote:
>>     
>>> Well, let's see it?  What do you do with expressions that don't fit?
>>>       
>
>   
>> See attached.
>>     
>
> This isn't going to work as-is, because (a) buf->data can be moved
> around by repalloc, and (b) you're not allowing for newlines being
> introduced within the column expressions.  You could probably fix it,
> but given the lack of consensus for a line-length-based approach, I'm
> not sure it's worth putting more effort into.
>   


Yeah, it was just a prototype. I'll just provide for an pg_get_viewdef() 
variant that adopts my original approach, which I don't think suffers 
either of those problems. Surely that won't upset anyone, at least. It's 
what I really wanted anyway.

cheers

andrew


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pretty print viewdefs
Next
From: Greg Stark
Date:
Subject: Re: pretty print viewdefs