Re: [HACKERS] Remove "Source Code" column from \df+ ?

2016-11-08 Thread Robert Haas
On Wed, Oct 12, 2016 at 1:48 PM, Peter Eisentraut
 wrote:
> On 10/12/16 11:16 AM, Tom Lane wrote:
>> I'm not sure that Peter was voting for retaining "internal name", but
>> personally I prefer that to deleting prosrc entirely, so +1.
>
> I'm not sure what the point of showing the internal name would be if we
> have already declared that the source code of non-C functions is not
> that interesting.  But I don't have a strong feeling about it.

There is still an open CommitFest entry for this patch, which is
marked "Ready for Committer", but it looks to me like there's no
consensus position here.  Different people have different preferences,
and every option that is somebody's first preference seems to be
somebody else's last preference.  So I suggest that we give this one
up for a lost cause and mark it Rejected.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Remove "Source Code" column from \df+ ?

2016-11-08 Thread Tom Lane
Robert Haas  writes:
> There is still an open CommitFest entry for this patch, which is
> marked "Ready for Committer", but it looks to me like there's no
> consensus position here.  Different people have different preferences,
> and every option that is somebody's first preference seems to be
> somebody else's last preference.  So I suggest that we give this one
> up for a lost cause and mark it Rejected.

Yeah, that's about where I'm at on it too.

regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Remove "Source Code" column from \df+ ?

2016-11-08 Thread Robert Haas
On Tue, Nov 8, 2016 at 4:18 PM, Tom Lane  wrote:
> Robert Haas  writes:
>> There is still an open CommitFest entry for this patch, which is
>> marked "Ready for Committer", but it looks to me like there's no
>> consensus position here.  Different people have different preferences,
>> and every option that is somebody's first preference seems to be
>> somebody else's last preference.  So I suggest that we give this one
>> up for a lost cause and mark it Rejected.
>
> Yeah, that's about where I'm at on it too.

Done.  We can reopen this if a vigorous consensus emerges.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Remove "Source Code" column from \df+ ?

2016-10-12 Thread Pavel Stehule
2016-10-12 19:48 GMT+02:00 Peter Eisentraut <
peter.eisentr...@2ndquadrant.com>:

> On 10/12/16 11:16 AM, Tom Lane wrote:
> > I'm not sure that Peter was voting for retaining "internal name", but
> > personally I prefer that to deleting prosrc entirely, so +1.
>
> I'm not sure what the point of showing the internal name would be if we
> have already declared that the source code of non-C functions is not
> that interesting.  But I don't have a strong feeling about it.
>

The benefit is for people who have to look on C implementation of internal
functions. Probably not too big group - but it can be interesting for
beginners who starting with reading of PostgreSQL code.

Regards

Pavel


>
> --
> Peter Eisentraut  http://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
>


Re: [HACKERS] Remove "Source Code" column from \df+ ?

2016-10-12 Thread Peter Eisentraut
On 10/12/16 11:16 AM, Tom Lane wrote:
> I'm not sure that Peter was voting for retaining "internal name", but
> personally I prefer that to deleting prosrc entirely, so +1.

I'm not sure what the point of showing the internal name would be if we
have already declared that the source code of non-C functions is not
that interesting.  But I don't have a strong feeling about it.

-- 
Peter Eisentraut  http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Remove "Source Code" column from \df+ ?

2016-10-12 Thread Tom Lane
Stephen Frost  writes:
> * Robert Haas (robertmh...@gmail.com) wrote:
>> I'm still not used to the change that I have to use \d+ rather than \d
>> to see the view definition.  It's the #1 thing I want to see when
>> examining a view, and since 2fe1b4dd651917aad2accac7ba8adb44d9f54930 I
>> have to remember to stick a + sign in there.  So, in short, I agree.

> I definitely see the argument of "\d on a view used to give me the view
> def and now it's almost useless and I have to remember to \d+ all the
> time", but I also think that I might be able to retrain my fingers to
> do \sv for views more easily than always remembering to add a '+' to \d,
> which I use much more frequently than \sv or \d+.

I'm unimpressed with the "I can retrain" argument, because that only
applies to people who exclusively use the latest and greatest.  \sv
didn't exist before 9.6, so if I relearn to use that, it'll fail on me
anytime I'm using a pre-9.6 psql, which is going to be a significant
percentage of the time for awhile to come.

Some quick digging says that \d on a view included the view definition
in a footer since the very beginning (7.0 era, see commit a45195a19) and
we changed it in 9.0 to require +.  That's a heck of a lot of history
and fingertip knowledge to override on the strength of one man's
complaint, even if he is the man who made it that way in the first place.
I also note that getting into the habit of using "\d+" to see view
definitions didn't create any major problems when using older psqls.

(BTW, \sf has been there since 9.1, which means that equating the
compatibility situations for views and functions is a fallacy.)

regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Remove "Source Code" column from \df+ ?

2016-10-12 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote:
> Stephen Frost  writes:
> > * Peter Eisentraut (peter.eisentr...@2ndquadrant.com) wrote:
> >> I'm OK with just removing all the source codes from the \d family and
> >> using the \s family instead.
> 
> > Ok, great, thanks for clarifying that.  Since we only have '\sf' today,
> > I think the prevailing option here is then to make the change to
> > removing 'prosrc' from \df+, have an 'internal name' column, and have
> > users use \sf for functions.
> 
> I'm not sure that Peter was voting for retaining "internal name", but
> personally I prefer that to deleting prosrc entirely, so +1.

Apologies, didn't mean to say that he had agree with keeping 'internal
name', just that it seemed to be the most generally accepted apporach
(and it has a +1 from me as well).

> > Personally, I like the idea of a '\sv' for views, though we should
> > discuss that on a new thread.
> 
> We have \sv already no?

Right, sorry.

> I'm kind of -1 on removing view definitions from \d+.  It's worked like
> that for a very long time and Peter's is the first complaint I've heard.
> I think changing it is likely to annoy more people than will think it's
> an improvement.

* Robert Haas (robertmh...@gmail.com) wrote:
> I'm still not used to the change that I have to use \d+ rather than \d
> to see the view definition.  It's the #1 thing I want to see when
> examining a view, and since 2fe1b4dd651917aad2accac7ba8adb44d9f54930 I
> have to remember to stick a + sign in there.  So, in short, I agree.

I definitely see the argument of "\d on a view used to give me the view
def and now it's almost useless and I have to remember to \d+ all the
time", but I also think that I might be able to retrain my fingers to
do \sv for views more easily than always remembering to add a '+' to \d,
which I use much more frequently than \sv or \d+.

Thanks!

Stephen


signature.asc
Description: Digital signature


Re: [HACKERS] Remove "Source Code" column from \df+ ?

2016-10-12 Thread Robert Haas
On Wed, Oct 12, 2016 at 8:16 AM, Tom Lane  wrote:
> Stephen Frost  writes:
>> * Peter Eisentraut (peter.eisentr...@2ndquadrant.com) wrote:
>>> I'm OK with just removing all the source codes from the \d family and
>>> using the \s family instead.
>
>> Ok, great, thanks for clarifying that.  Since we only have '\sf' today,
>> I think the prevailing option here is then to make the change to
>> removing 'prosrc' from \df+, have an 'internal name' column, and have
>> users use \sf for functions.
>
> I'm not sure that Peter was voting for retaining "internal name", but
> personally I prefer that to deleting prosrc entirely, so +1.
>
>> Personally, I like the idea of a '\sv' for views, though we should
>> discuss that on a new thread.
>
> We have \sv already no?
>
> I'm kind of -1 on removing view definitions from \d+.  It's worked like
> that for a very long time and Peter's is the first complaint I've heard.
> I think changing it is likely to annoy more people than will think it's
> an improvement.

I'm still not used to the change that I have to use \d+ rather than \d
to see the view definition.  It's the #1 thing I want to see when
examining a view, and since 2fe1b4dd651917aad2accac7ba8adb44d9f54930 I
have to remember to stick a + sign in there.  So, in short, I agree.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Remove "Source Code" column from \df+ ?

2016-10-12 Thread Tom Lane
Stephen Frost  writes:
> * Peter Eisentraut (peter.eisentr...@2ndquadrant.com) wrote:
>> I'm OK with just removing all the source codes from the \d family and
>> using the \s family instead.

> Ok, great, thanks for clarifying that.  Since we only have '\sf' today,
> I think the prevailing option here is then to make the change to
> removing 'prosrc' from \df+, have an 'internal name' column, and have
> users use \sf for functions.

I'm not sure that Peter was voting for retaining "internal name", but
personally I prefer that to deleting prosrc entirely, so +1.

> Personally, I like the idea of a '\sv' for views, though we should
> discuss that on a new thread.

We have \sv already no?

I'm kind of -1 on removing view definitions from \d+.  It's worked like
that for a very long time and Peter's is the first complaint I've heard.
I think changing it is likely to annoy more people than will think it's
an improvement.

regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Remove "Source Code" column from \df+ ?

2016-10-12 Thread Stephen Frost
* Peter Eisentraut (peter.eisentr...@2ndquadrant.com) wrote:
> On 10/12/16 11:08 AM, Stephen Frost wrote:
> > Personally, I like the idea of a '\sv' for views, though we should
> > discuss that on a new thread.
> 
> \sv already exists. :-)

Whoops, sorry, was looking at a 9.5 psql. :)

Neat!

Thanks!

Stephen


signature.asc
Description: Digital signature


Re: [HACKERS] Remove "Source Code" column from \df+ ?

2016-10-12 Thread Peter Eisentraut
On 10/12/16 11:08 AM, Stephen Frost wrote:
> Personally, I like the idea of a '\sv' for views, though we should
> discuss that on a new thread.

\sv already exists. :-)

-- 
Peter Eisentraut  http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Remove "Source Code" column from \df+ ?

2016-10-12 Thread Stephen Frost
* Peter Eisentraut (peter.eisentr...@2ndquadrant.com) wrote:
> On 10/11/16 7:51 PM, Tom Lane wrote:
> > 1. Do nothing.
> > 2. Remove the prosrc column from \df+ altogether.
> > 3. Suppress prosrc for PL functions, but continue to show it for
> >C and internal functions (and, probably, rename it to something
> >other than "Source code" in that case).
> > 4. #3 plus show PL function source code in footers.
> 
> One related annoyance I have with psql is that \d+ on a view *does* show
> the "source code" in the footer, because it's often too long and bulky
> and ugly and unrelated to why I wanted to use the +.

I tend to agree with that, though I believe it's a topic for another
thread.

> I'm OK with just removing all the source codes from the \d family and
> using the \s family instead.

Ok, great, thanks for clarifying that.  Since we only have '\sf' today,
I think the prevailing option here is then to make the change to
removing 'prosrc' from \df+, have an 'internal name' column, and have
users use \sf for functions.

If anyone feels differently, please speak up.

Personally, I like the idea of a '\sv' for views, though we should
discuss that on a new thread.

Thanks!

Stephen


signature.asc
Description: Digital signature


Re: [HACKERS] Remove "Source Code" column from \df+ ?

2016-10-12 Thread Peter Eisentraut
On 10/11/16 7:51 PM, Tom Lane wrote:
> 1. Do nothing.
> 2. Remove the prosrc column from \df+ altogether.
> 3. Suppress prosrc for PL functions, but continue to show it for
>C and internal functions (and, probably, rename it to something
>other than "Source code" in that case).
> 4. #3 plus show PL function source code in footers.

One related annoyance I have with psql is that \d+ on a view *does* show
the "source code" in the footer, because it's often too long and bulky
and ugly and unrelated to why I wanted to use the +.

I'm OK with just removing all the source codes from the \d family and
using the \s family instead.

-- 
Peter Eisentraut  http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Remove "Source Code" column from \df+ ?

2016-10-12 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote:
> Stephen Frost  writes:
> > As was mentioned, this thread doesn't really need a patch but rather
> > some comment from those who have voiced a -1 on removing the PL source
> > code column.
> 
> > In another, perhaps vain, attempt to get to a consensus, here's what it
> > looks like the current standings are for "Remove source from \df+",
> 
> I think this is oversimplified, because there are multiple proposals on
> the table, and it's not entirely clear to me who approves of which.

That's certainly fair and I had begun that email by trying to come up
with a way to represent everyone's positions fairly but, frankly, after
an hour of reading through the thread and noting the various changes in
positions, I got to the point where I felt...

> > There have been a number of voices asking that we do *something* here.
> 
> Yes.  I agree with your summary that Peter is the only one who appears
> to be in favor of "do nothing" (and even there, his complaint was at
> least partly procedural not substantive).

We really need a response on this part if we're going to actually make
any progress.

If we'd actually like to do a formal condorcet-style vote (or something
similar which allows preferences to be considered) over the various
options, I'm willing to put effort into making it happen, but only if
we'd actually agree to accept the result, otherwise we're just back here
again.

Thanks!

Stephen


signature.asc
Description: Digital signature


Re: [HACKERS] Remove "Source Code" column from \df+ ?

2016-10-11 Thread Pavel Stehule
2016-10-12 1:51 GMT+02:00 Tom Lane :

> Stephen Frost  writes:
> > As was mentioned, this thread doesn't really need a patch but rather
> > some comment from those who have voiced a -1 on removing the PL source
> > code column.
>
> > In another, perhaps vain, attempt to get to a consensus, here's what it
> > looks like the current standings are for "Remove source from \df+",
>
> I think this is oversimplified, because there are multiple proposals on
> the table, and it's not entirely clear to me who approves of which.
> We have at least the following options:
>
> 1. Do nothing.
> 2. Remove the prosrc column from \df+ altogether.
> 3. Suppress prosrc for PL functions, but continue to show it for
>C and internal functions (and, probably, rename it to something
>other than "Source code" in that case).
> 4. #3 plus show PL function source code in footers.
>
> Personally I like #4 better than #3 better than #2 better than #1,
> but the only one I'm really against is "do nothing".
>

My preferences:  #2, #1 - I dislike #4 more than #1 - I don't see any
benefit there

Regards

Pavel


>
> > There have been a number of voices asking that we do *something* here.
>
> Yes.  I agree with your summary that Peter is the only one who appears
> to be in favor of "do nothing" (and even there, his complaint was at
> least partly procedural not substantive).
>
> regards, tom lane
>


Re: [HACKERS] Remove "Source Code" column from \df+ ?

2016-10-11 Thread Tom Lane
Stephen Frost  writes:
> As was mentioned, this thread doesn't really need a patch but rather
> some comment from those who have voiced a -1 on removing the PL source
> code column.

> In another, perhaps vain, attempt to get to a consensus, here's what it
> looks like the current standings are for "Remove source from \df+",

I think this is oversimplified, because there are multiple proposals on
the table, and it's not entirely clear to me who approves of which.
We have at least the following options:

1. Do nothing.
2. Remove the prosrc column from \df+ altogether.
3. Suppress prosrc for PL functions, but continue to show it for
   C and internal functions (and, probably, rename it to something
   other than "Source code" in that case).
4. #3 plus show PL function source code in footers.

Personally I like #4 better than #3 better than #2 better than #1,
but the only one I'm really against is "do nothing".

> There have been a number of voices asking that we do *something* here.

Yes.  I agree with your summary that Peter is the only one who appears
to be in favor of "do nothing" (and even there, his complaint was at
least partly procedural not substantive).

regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers