Thread: \x in psql

\x in psql

From
Christopher Kings-Lynne
Date:
When you turn on \x mode for query output in psql, it wrecks the output 
of \d <table>, etc.

Should we change it so that the \d is unaffected by \x?  What about for 
other \d commands?

Chris


Re: \x in psql

From
Bruce Momjian
Date:
Christopher Kings-Lynne wrote:
> When you turn on \x mode for query output in psql, it wrecks the output 
> of \d <table>, etc.
> 
> Should we change it so that the \d is unaffected by \x?  What about for 
> other \d commands?

Well, they asked for \x so why is it wrong for us to \x the \d output
like we do now?

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


Re: \x in psql

From
Tom Lane
Date:
Christopher Kings-Lynne <chriskl@familyhealth.com.au> writes:
> When you turn on \x mode for query output in psql, it wrecks the output 
> of \d <table>, etc.

"Wrecks" to you maybe ... but if someone likes \x display, why wouldn't
they like it for \d too?

One could argue that the real bug is that the footers in \d don't change
to look like \x output.
        regards, tom lane


Re: \x in psql

From
"Greg Sabino Mullane"
Date:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Tom Lane wrote:
> "Wrecks" to you maybe ... but if someone likes \x display, why wouldn't
> they like it for \d too?
>
> One could argue that the real bug is that the footers in \d don't change
> to look like \x output.

Indeed, it behaves exactly the way I would expect it to. I would not want
to see the footers chopped up further. Christopher, maybe you can describe
more what behavior you would like to see?

- --
Greg Sabino Mullane greg@turnstep.com
PGP Key: 0x14964AC8 200503232000
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8

-----BEGIN PGP SIGNATURE-----

iD8DBQFCQhE7vJuQZxSWSsgRAp1nAJ46w499EqDBzdoKQ2VbC3ikER6MNACdER0I
FTZJcTSWOfgxiARjAbszHdg=
=qQkd
-----END PGP SIGNATURE-----




Re: \x in psql

From
Christopher Kings-Lynne
Date:
>>When you turn on \x mode for query output in psql, it wrecks the output 
>>of \d <table>, etc.
>>
>>Should we change it so that the \d is unaffected by \x?  What about for 
>>other \d commands?
> 
> Well, they asked for \x so why is it wrong for us to \x the \d output
> like we do now?

Because I have the feeling (back me up on this people) that most people 
who use it still want to be able to read their table definitions while 
working in \x mode.  Who on earth would want \x to affect their table 
output??

Also, it doesn't affect the bit below the table, like indexes and 
constraints, so you have this wacky column output, then perfectly normal 
index and constraint display!

Chris