Re: Adding \ev view editor?

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: "David E(dot) Wheeler" <david(at)kineticode(dot)com>
Cc: Merlin Moncure <mmoncure(at)gmail(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Adding \ev view editor?
Date: 2009-09-02 16:35:13
Message-ID: 4A9E9EC1.5030303@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

David E. Wheeler wrote:
> On Sep 2, 2009, at 5:07 AM, Merlin Moncure wrote:
>
>> One reason I don't like this proposal is that postgresql does not
>> preserve the original 'create view' statement for editing. The
>> resulting sql that is given to you to edit is hopelessly mangled and I
>> think it's not good to encourage people to modify views in this
>> fashion.
>>
>> Then again, we are only reproducing what pgadmin can already do, so
>> why not? :-)
>
> Is there any reason that the CREATE VIEW output to pg_dump and,
> presumably, \ev, couldn't be refactored to pretty-print the VIEW
> declaration?
>
>

Tom just said a day or two ago that he doesn't want pg_dump using any
pretty printing, and I think there is some sense in that.

As discussed last week, the current viewdef pretty printing doesn't put
each target in the select list on it own line (or lines) - hence my
proposal to make it do so. I think this would be even more desirable if
we have \ev. Without that I think \ev is likely to be fairly useless.

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-09-02 16:54:06 Re: trigger SPI_exec count argument
Previous Message David E. Wheeler 2009-09-02 16:24:45 Re: Adding \ev view editor?