Unix Technical Forum

\x in psql

This is a discussion on \x in psql within the pgsql Hackers forums, part of the PostgreSQL category; --> When you turn on \x mode for query output in psql, it wrecks the output of \d <table>, etc. ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Hackers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-11-2008, 04:11 AM
Christopher Kings-Lynne
 
Posts: n/a
Default \x in psql

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

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-11-2008, 04:11 AM
Bruce Momjian
 
Posts: n/a
Default Re: \x in psql

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, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-11-2008, 04:11 AM
Tom Lane
 
Posts: n/a
Default Re: \x in psql

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

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-11-2008, 04:12 AM
Greg Sabino Mullane
 
Posts: n/a
Default Re: \x in psql


-----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=2529DF...9B906714964AC8

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

iD8DBQFCQhE7vJuQZxSWSsgRAp1nAJ46w499EqDBzdoKQ2VbC3 ikER6MNACdER0I
FTZJcTSWOfgxiARjAbszHdg=
=qQkd
-----END PGP SIGNATURE-----



---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-11-2008, 04:12 AM
Christopher Kings-Lynne
 
Posts: n/a
Default Re: \x in psql

>>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

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 12:14 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com