Re: psql :: support for \ev viewname and \sv viewname - Mailing list pgsql-hackers

From Petr Korobeinikov
Subject Re: psql :: support for \ev viewname and \sv viewname
Date
Msg-id CAJL5ff-B2LQPoVJtA6T_RAeZekX5BFjMA2+BASEO+_bN33OxeA@mail.gmail.com
Whole thread Raw
In response to Re: psql :: support for \ev viewname and \sv viewname  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: psql :: support for \ev viewname and \sv viewname  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers


пт, 3 июля 2015 г. в 19:30, Tom Lane <tgl@sss.pgh.pa.us>:
So AFAICS, \ev and \sv should just number lines straightforwardly, with
"1" being the first line of the CREATE command text.  Am I missing
something?

Fixed. Now both \ev and \sv  numbering lines starting with "1". New version attached.

As I've already noticed that pg_get_viewdef() does not support full syntax of creating or replacing views. In my opinion, psql source code isn't the place where some formatting hacks should be. So, can you give me an idea how to produce already formatted output supporting "WITH" statement without breaking backward compatibility of pg_get_viewdef() internals?
Attachment

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Synch failover WAS: Support for N synchronous standby servers - take 2
Next
From: Amit Kapila
Date:
Subject: Re: Let PostgreSQL's On Schedule checkpoint write buffer smooth spread cycle by tuning IsCheckpointOnSchedule?