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