Re: expanded \df+ display broken in beta4

Lists: pgsql-hackerspgsql-patches
From: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Subject: expanded \df+ display broken in beta4
Date: 2005-10-25 18:27:50
Message-ID: 1130264871.2022.50.camel@camel
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

not sure exactly when this was changed, but expanded display of \df+
output is broken in beta4. compare:

[postgres(at)localhost data]$ /usr/local/pgsql-8.1.x/bin/psql -p 5481
template1
Welcome to psql 8.1beta4, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit

template1=# \df+ area
List of functions
Schema | Name | Result data type | Argument data types | Owner |
Language | Source code | Description
------------+------+------------------+---------------------+----------+----------+-------------+-----------------------
pg_catalog | area | double precision | box | postgres |
internal | box_area | box area
pg_catalog | area | double precision | circle | postgres |
internal | circle_area | area of circle
pg_catalog | area | double precision | path | postgres |
internal | path_area | area of a closed path
(3 rows)

template1=# \x
Expanded display is on.
template1=# \df+ area
List of functions
Schema | Name | Result data type | Argument data types | Owner |
Language | Source code | Description
------------+------+------------------+---------------------+----------+----------+-------------+-----------------------
pg_catalog | area | double precision | box | postgres |
internal | box_area | box area
pg_catalog | area | double precision | circle | postgres |
internal | circle_area | area of circle
pg_catalog | area | double precision | path | postgres |
internal | path_area | area of a closed path

[postgres(at)localhost data]$ /usr/local/pgsql-8.0.x/bin/psql -p 5481
template1
Welcome to psql 8.0.4, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit

template1=# \df+ area
List of functions
Schema | Name | Result data type | Argument data types | Owner |
Language | Source code | Description
------------+------+------------------+---------------------+----------+----------+-------------+-----------------------
pg_catalog | area | double precision | box | postgres |
internal | box_area | box area
pg_catalog | area | double precision | circle | postgres |
internal | circle_area | area of circle
pg_catalog | area | double precision | path | postgres |
internal | path_area | area of a closed path
(3 rows)

template1=# \x
Expanded display is on.
template1=# \df+ area
List of functions
-[ RECORD 1 ]-------+----------------------
Schema | pg_catalog
Name | area
Result data type | double precision
Argument data types | box
Owner | postgres
Language | internal
Source code | box_area
Description | box area
-[ RECORD 2 ]-------+----------------------
Schema | pg_catalog
Name | area
Result data type | double precision
Argument data types | circle
Owner | postgres
Language | internal
Source code | circle_area
Description | area of circle
-[ RECORD 3 ]-------+----------------------
Schema | pg_catalog
Name | area
Result data type | double precision
Argument data types | path
Owner | postgres
Language | internal
Source code | path_area
Description | area of a closed path

template1=#

certainly the second is much more legible... this is on... FC3 in case
it matters.

Robert Treat
--
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL


From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: expanded \df+ display broken in beta4
Date: 2005-10-25 18:42:46
Message-ID: 20051025184246.GA75603@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

On Tue, Oct 25, 2005 at 02:27:50PM -0400, Robert Treat wrote:
> not sure exactly when this was changed, but expanded display of \df+
> output is broken in beta4.

http://archives.postgresql.org/pgsql-hackers/2005-06/msg00423.php
http://archives.postgresql.org/pgsql-committers/2005-06/msg00149.php

--
Michael Fuhr


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: expanded \df+ display broken in beta4
Date: 2005-10-25 18:51:04
Message-ID: 200510251851.j9PIp4E06228@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches


Good point. We modified 8.1 so backslash commands do not honor \x
because things like \d look silly in \x, but \df+ looks better with \x,
no question.

Ideally I think \x should allow three modes, on, off, and auto, with
auto doing \x if the row output is wider than the screen. If we had
this, backslash commands could be auto, or we can set all queries to
auto by default.

Added to TODO:

o Add auto-expanded mode so expanded output is used if the row
length is wider than the screen width.

Consider using auto-expanded mode for backslash commands like \df+.

---------------------------------------------------------------------------

Robert Treat wrote:
> not sure exactly when this was changed, but expanded display of \df+
> output is broken in beta4. compare:
>
>
> [postgres(at)localhost data]$ /usr/local/pgsql-8.1.x/bin/psql -p 5481
> template1
> Welcome to psql 8.1beta4, the PostgreSQL interactive terminal.
>
> Type: \copyright for distribution terms
> \h for help with SQL commands
> \? for help with psql commands
> \g or terminate with semicolon to execute query
> \q to quit
>
> template1=# \df+ area
> List of functions
> Schema | Name | Result data type | Argument data types | Owner |
> Language | Source code | Description
> ------------+------+------------------+---------------------+----------+----------+-------------+-----------------------
> pg_catalog | area | double precision | box | postgres |
> internal | box_area | box area
> pg_catalog | area | double precision | circle | postgres |
> internal | circle_area | area of circle
> pg_catalog | area | double precision | path | postgres |
> internal | path_area | area of a closed path
> (3 rows)
>
> template1=# \x
> Expanded display is on.
> template1=# \df+ area
> List of functions
> Schema | Name | Result data type | Argument data types | Owner |
> Language | Source code | Description
> ------------+------+------------------+---------------------+----------+----------+-------------+-----------------------
> pg_catalog | area | double precision | box | postgres |
> internal | box_area | box area
> pg_catalog | area | double precision | circle | postgres |
> internal | circle_area | area of circle
> pg_catalog | area | double precision | path | postgres |
> internal | path_area | area of a closed path
>
>
> [postgres(at)localhost data]$ /usr/local/pgsql-8.0.x/bin/psql -p 5481
> template1
> Welcome to psql 8.0.4, the PostgreSQL interactive terminal.
>
> Type: \copyright for distribution terms
> \h for help with SQL commands
> \? for help with psql commands
> \g or terminate with semicolon to execute query
> \q to quit
>
> template1=# \df+ area
> List of functions
> Schema | Name | Result data type | Argument data types | Owner |
> Language | Source code | Description
> ------------+------+------------------+---------------------+----------+----------+-------------+-----------------------
> pg_catalog | area | double precision | box | postgres |
> internal | box_area | box area
> pg_catalog | area | double precision | circle | postgres |
> internal | circle_area | area of circle
> pg_catalog | area | double precision | path | postgres |
> internal | path_area | area of a closed path
> (3 rows)
>
> template1=# \x
> Expanded display is on.
> template1=# \df+ area
> List of functions
> -[ RECORD 1 ]-------+----------------------
> Schema | pg_catalog
> Name | area
> Result data type | double precision
> Argument data types | box
> Owner | postgres
> Language | internal
> Source code | box_area
> Description | box area
> -[ RECORD 2 ]-------+----------------------
> Schema | pg_catalog
> Name | area
> Result data type | double precision
> Argument data types | circle
> Owner | postgres
> Language | internal
> Source code | circle_area
> Description | area of circle
> -[ RECORD 3 ]-------+----------------------
> Schema | pg_catalog
> Name | area
> Result data type | double precision
> Argument data types | path
> Owner | postgres
> Language | internal
> Source code | path_area
> Description | area of a closed path
>
> template1=#
>
>
> certainly the second is much more legible... this is on... FC3 in case
> it matters.
>
>
> Robert Treat
> --
> Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073


From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: expanded \df+ display broken in beta4
Date: 2005-10-25 19:05:15
Message-ID: 20051025190515.GI22318@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

On Tue, Oct 25, 2005 at 02:51:04PM -0400, Bruce Momjian wrote:
>
> Good point. We modified 8.1 so backslash commands do not honor \x
> because things like \d look silly in \x, but \df+ looks better with \x,
> no question.
>
> Ideally I think \x should allow three modes, on, off, and auto, with
> auto doing \x if the row output is wider than the screen. If we had
> this, backslash commands could be auto, or we can set all queries to
> auto by default.

I have a patch on my local system that fixes the splattering across the
screen you currently get with multiline function definitions. Maybe
once that has been fixed we should revisit this.

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: expanded \df+ display broken in beta4
Date: 2005-10-25 19:35:53
Message-ID: 200510251935.j9PJZrc10601@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Martijn van Oosterhout wrote:
-- Start of PGP signed section.
> On Tue, Oct 25, 2005 at 02:51:04PM -0400, Bruce Momjian wrote:
> >
> > Good point. We modified 8.1 so backslash commands do not honor \x
> > because things like \d look silly in \x, but \df+ looks better with \x,
> > no question.
> >
> > Ideally I think \x should allow three modes, on, off, and auto, with
> > auto doing \x if the row output is wider than the screen. If we had
> > this, backslash commands could be auto, or we can set all queries to
> > auto by default.
>
> I have a patch on my local system that fixes the splattering across the
> screen you currently get with multiline function definitions. Maybe
> once that has been fixed we should revisit this.

Yes, but \df+ is not multi-line per column.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073


From: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
To: Michael Fuhr <mike(at)fuhr(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: expanded \df+ display broken in beta4
Date: 2005-10-25 20:04:35
Message-ID: 1130270676.2399.89.camel@camel
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

On Tue, 2005-10-25 at 14:42, Michael Fuhr wrote:
> On Tue, Oct 25, 2005 at 02:27:50PM -0400, Robert Treat wrote:
> > not sure exactly when this was changed, but expanded display of \df+
> > output is broken in beta4.
>
> http://archives.postgresql.org/pgsql-hackers/2005-06/msg00423.php
> http://archives.postgresql.org/pgsql-committers/2005-06/msg00149.php
>

grr... I thought I remembered Chris KL mentioning something about that
after I sent my email... and I see now that I actually did reply to that
thread saying I liked the \x \df+ output...

Robert Treat
--
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL


From: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: expanded \df+ display broken in beta4
Date: 2005-10-25 21:15:40
Message-ID: 1130274940.2399.106.camel@camel
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

On Tue, 2005-10-25 at 14:51, Bruce Momjian wrote:
>
> Good point. We modified 8.1 so backslash commands do not honor \x
> because things like \d look silly in \x, but \df+ looks better with \x,
> no question.
>
> Ideally I think \x should allow three modes, on, off, and auto, with
> auto doing \x if the row output is wider than the screen. If we had
> this, backslash commands could be auto, or we can set all queries to
> auto by default.
>

ISTM even a GUC to enable/disable would have been better scheme than
what we have now; we are basically leaving no options for those who
found the old behavior useful, while what we had before would at least
let people switch back and forth.

Robert Treat
--
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL


From: "Michael Paesold" <mpaesold(at)gmx(dot)at>
To: "Robert Treat" <xzilla(at)users(dot)sourceforge(dot)net>, "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: expanded \df+ display broken in beta4
Date: 2005-10-25 21:33:14
Message-ID: 001401c5d9ab$b4f57f70$0f01a8c0@zaphod
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Robert Treat wrote:

> On Tue, 2005-10-25 at 14:51, Bruce Momjian wrote:
>>
>> Good point. We modified 8.1 so backslash commands do not honor \x
>> because things like \d look silly in \x, but \df+ looks better with \x,
>> no question.
>>
>> Ideally I think \x should allow three modes, on, off, and auto, with
>> auto doing \x if the row output is wider than the screen. If we had
>> this, backslash commands could be auto, or we can set all queries to
>> auto by default.
>>
>
> ISTM even a GUC to enable/disable would have been better scheme than
> what we have now; we are basically leaving no options for those who
> found the old behavior useful, while what we had before would at least
> let people switch back and forth.

I think Robert is right here and the new behaviour is a step backwards.

Best Regards,
Michael Paesold


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Michael Paesold" <mpaesold(at)gmx(dot)at>
Cc: "Robert Treat" <xzilla(at)users(dot)sourceforge(dot)net>, "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: expanded \df+ display broken in beta4
Date: 2005-10-25 21:55:21
Message-ID: 29403.1130277321@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

"Michael Paesold" <mpaesold(at)gmx(dot)at> writes:
> Robert Treat wrote:
>> ISTM even a GUC to enable/disable would have been better scheme than
>> what we have now; we are basically leaving no options for those who
>> found the old behavior useful, while what we had before would at least
>> let people switch back and forth.

> I think Robert is right here and the new behaviour is a step backwards.

Should we revert the patch for the time being, and take another go at it
in 8.2?

Is it practical to have the old behavior for \df (and anything else with
particularly wide output) while still forcing \x off for \d?

regards, tom lane


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Michael Paesold <mpaesold(at)gmx(dot)at>, Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] expanded \df+ display broken in beta4
Date: 2005-10-26 00:03:16
Message-ID: 200510260003.j9Q03GQ09494@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:
> "Michael Paesold" <mpaesold(at)gmx(dot)at> writes:
> > Robert Treat wrote:
> >> ISTM even a GUC to enable/disable would have been better scheme than
> >> what we have now; we are basically leaving no options for those who
> >> found the old behavior useful, while what we had before would at least
> >> let people switch back and forth.
>
> > I think Robert is right here and the new behaviour is a step backwards.
>
> Should we revert the patch for the time being, and take another go at it
> in 8.2?
>
> Is it practical to have the old behavior for \df (and anything else with
> particularly wide output) while still forcing \x off for \d?

Here is a quick patch, not for application, that makes \df+ honor \x,
but not \df. Basicaly verbose honors \x, non-verbose does not. I think
would need renaming of the normal_query variable, and more checking in
the code to make sure we are OK.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

Attachment Content-Type Size
unknown_filename text/plain 757 bytes

From: Michael Paesold <mpaesold(at)gmx(dot)at>
To:
Cc: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: expanded \df+ display broken in beta4
Date: 2005-10-26 14:07:46
Message-ID: 435F8DB2.3040103@gmx.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:
> "Michael Paesold" <mpaesold(at)gmx(dot)at> writes:
>
>>Robert Treat wrote:
>>
>>>ISTM even a GUC to enable/disable would have been better scheme than
>>>what we have now; we are basically leaving no options for those who
>>>found the old behavior useful, while what we had before would at least
>>>let people switch back and forth.
>
>
>>I think Robert is right here and the new behaviour is a step backwards.
>
>
> Should we revert the patch for the time being, and take another go at it
> in 8.2?

As the last option, if there is no quick fix, I'd say yes. Better than
making an incomplete change now and revert that later to get a better
solution.

> Is it practical to have the old behavior for \df (and anything else with
> particularly wide output) while still forcing \x off for \d?

I think there are quite some ways to handle the problem:
1) \x to get the new behaviour, \xx or \x+ to get the new one.

2) Have \x+ or something automatically switch based on screen width.

Other suggestions...
Well, unfortunately, I guess now is not the time to discuss this for 8.1.

Best Regards,
Michael Paesold


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Michael Paesold <mpaesold(at)gmx(dot)at>
Cc: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: expanded \df+ display broken in beta4
Date: 2005-10-26 14:11:50
Message-ID: 200510261411.j9QEBok29255@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Michael Paesold wrote:
> Tom Lane wrote:
> > "Michael Paesold" <mpaesold(at)gmx(dot)at> writes:
> >
> >>Robert Treat wrote:
> >>
> >>>ISTM even a GUC to enable/disable would have been better scheme than
> >>>what we have now; we are basically leaving no options for those who
> >>>found the old behavior useful, while what we had before would at least
> >>>let people switch back and forth.
> >
> >
> >>I think Robert is right here and the new behaviour is a step backwards.
> >
> >
> > Should we revert the patch for the time being, and take another go at it
> > in 8.2?
>
> As the last option, if there is no quick fix, I'd say yes. Better than
> making an incomplete change now and revert that later to get a better
> solution.
>
> > Is it practical to have the old behavior for \df (and anything else with
> > particularly wide output) while still forcing \x off for \d?
>
> I think there are quite some ways to handle the problem:
> 1) \x to get the new behaviour, \xx or \x+ to get the new one.
>
> 2) Have \x+ or something automatically switch based on screen width.
>
> Other suggestions...
> Well, unfortunately, I guess now is not the time to discuss this for 8.1.

One idea is to hack \d not to honor \x, and let the others honor it.
That would probably hit most of the cases people will use in 8.1.

In fact, \d is pretty special because it is more of a group of outputs,
unlike \df, which is a single table output.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073


From: Michael Paesold <mpaesold(at)gmx(dot)at>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: expanded \df+ display broken in beta4
Date: 2005-10-26 14:48:05
Message-ID: 435F9725.5050903@gmx.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Bruce Momjian wrote:
> Michael Paesold wrote:
>
>>Tom Lane wrote:
>>
>>>"Michael Paesold" <mpaesold(at)gmx(dot)at> writes:
>>>
>>>>Robert Treat wrote:
>>>>
>>>>>ISTM even a GUC to enable/disable would have been better scheme than
>>>>>what we have now; we are basically leaving no options for those who
>>>>>found the old behavior useful, while what we had before would at least
>>>>>let people switch back and forth.
>>>
>>>>I think Robert is right here and the new behaviour is a step backwards.
>>>
>>>Should we revert the patch for the time being, and take another go at it
>>>in 8.2?

> One idea is to hack \d not to honor \x, and let the others honor it.
> That would probably hit most of the cases people will use in 8.1.
>
> In fact, \d is pretty special because it is more of a group of outputs,
> unlike \df, which is a single table output.

+1 from me. That seems like a workable compromise and should probably
meet the needs of the author of the patch to change the \x behavior.

Best Regards,
Michael Paesold


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Michael Paesold <mpaesold(at)gmx(dot)at>
Cc: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] expanded \df+ display broken in beta4
Date: 2005-10-27 05:06:14
Message-ID: 200510270506.j9R56Ef05071@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Michael Paesold wrote:
> Bruce Momjian wrote:
> > Michael Paesold wrote:
> >
> >>Tom Lane wrote:
> >>
> >>>"Michael Paesold" <mpaesold(at)gmx(dot)at> writes:
> >>>
> >>>>Robert Treat wrote:
> >>>>
> >>>>>ISTM even a GUC to enable/disable would have been better scheme than
> >>>>>what we have now; we are basically leaving no options for those who
> >>>>>found the old behavior useful, while what we had before would at least
> >>>>>let people switch back and forth.
> >>>
> >>>>I think Robert is right here and the new behaviour is a step backwards.
> >>>
> >>>Should we revert the patch for the time being, and take another go at it
> >>>in 8.2?
>
> > One idea is to hack \d not to honor \x, and let the others honor it.
> > That would probably hit most of the cases people will use in 8.1.
> >
> > In fact, \d is pretty special because it is more of a group of outputs,
> > unlike \df, which is a single table output.
>
> +1 from me. That seems like a workable compromise and should probably
> meet the needs of the author of the patch to change the \x behavior.

OK, here is a patch that disables expanded output only for \d tablename.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

Attachment Content-Type Size
unknown_filename text/plain 3.4 KB

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Cc: Michael Paesold <mpaesold(at)gmx(dot)at>, Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
Subject: Re: [HACKERS] expanded \df+ display broken in beta4
Date: 2005-10-27 13:06:34
Message-ID: 200510271306.j9RD6Yu13281@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Bruce Momjian wrote:
> Michael Paesold wrote:
> > Bruce Momjian wrote:
> > > Michael Paesold wrote:
> > >
> > >>Tom Lane wrote:
> > >>
> > >>>"Michael Paesold" <mpaesold(at)gmx(dot)at> writes:
> > >>>
> > >>>>Robert Treat wrote:
> > >>>>
> > >>>>>ISTM even a GUC to enable/disable would have been better scheme than
> > >>>>>what we have now; we are basically leaving no options for those who
> > >>>>>found the old behavior useful, while what we had before would at least
> > >>>>>let people switch back and forth.
> > >>>
> > >>>>I think Robert is right here and the new behaviour is a step backwards.
> > >>>
> > >>>Should we revert the patch for the time being, and take another go at it
> > >>>in 8.2?
> >
> > > One idea is to hack \d not to honor \x, and let the others honor it.
> > > That would probably hit most of the cases people will use in 8.1.
> > >
> > > In fact, \d is pretty special because it is more of a group of outputs,
> > > unlike \df, which is a single table output.
> >
> > +1 from me. That seems like a workable compromise and should probably
> > meet the needs of the author of the patch to change the \x behavior.
>
> OK, here is a patch that disables expanded output only for \d tablename.

The patch is even easier than the original patch. There was never any
need for "normal_query". Because the structure is a copy of the
session-wide structure, we can just set expanded to true/false as
desired.

I have applied this updated patch which simply turns off expanded mode
for \d tablename. That seemed like the only complex backslash output in
describe.c. I have also updated the release notes.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

Attachment Content-Type Size
unknown_filename text/plain 3.7 KB