Re: PATCH: psql boolean display
От | Phil Sorber |
---|---|
Тема | Re: PATCH: psql boolean display |
Дата | |
Msg-id | CADAkt-g_wLZvtRBKSDLERKO8RD_RLh7=TP+4NjP6QAtPt6nTHg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: PATCH: psql boolean display ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>) |
Ответы |
Re: PATCH: psql boolean display
|
Список | pgsql-hackers |
<p><br /> On Aug 20, 2012 6:28 PM, "Kevin Grittner" <<a href="mailto:Kevin.Grittner@wicourts.gov">Kevin.Grittner@wicourts.gov</a>>wrote:<br /> ><br /> > Gurjeet Singh <<ahref="mailto:singh.gurjeet@gmail.com">singh.gurjeet@gmail.com</a>> wrote:<br /> ><br /> > > On occasionsI have wanted psql to emit the full 'True'/'False'<br /> > > words instead of cryptic one-letter t/f, whichcan get lost on<br /> > > long rows that get wrapped around on screen. Writing long-winded<br /> > > CASEexpressions to get the effect is too much for small ad-hoc<br /> > > queries.<br /> > ><br /> > > Ithought of inventing a data type whose out-function would emit<br /> > > these strings, and tack a ::mybool to theexpression I want<br /> > > modified. But that would break the applications if somebody pasted<br /> > > thesame query in an application (JDBC or some such that<br /> > > understands boolean) and expected a boolean datatype instead of a<br /> > > text output of an expression.<br /> ><br /> > The type itself does output true/false;it's just psql that uses<br /> > t/f.<br /> ><br /> > test=# select 'true'::boolean::text;<br /> > text<br /> > ------<br /> > true<br /> > (1 row)<br /> ><br /> > test=# select 'false'::boolean::text;<br/> > text<br /> > -------<br /> > false<br /> > (1 row)<br /> ><br /> > Thathas always seemed quite odd (and occasionally inconvenient) to<br /> > me.<p>I think that may be from the cast. Ididn't see any transformation in psql. Looked like it was raw output from the server.<p>><br /> > -Kevin<br />
В списке pgsql-hackers по дате отправления: