pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedto_char problem
2+ messages / 2 participants
[nested] [flat]
* to_char problem
@ 2002-04-13 16:57 postgresql <pgsql@symcom.com>
0 siblings, 1 reply; 2+ messages in thread
From: postgresql @ 2002-04-13 16:57 UTC (permalink / raw)
To: pgsql-sql
Can some one explain this result. Notice the select.... the result
shows the month followed by 5 spaces and then the comma one
space and the year.
Why are there 5 spaces (ascii 32) after the month? I get the same
thing if I say 'MonthDD, YYYY'. That is no space after the month.
Is this is operating as expected and my expectations are wrong,
point me to the manual pages that explain it.
Mac OSX 10.1.2 postgresql 7.2.1
fifthcolor=# select to_char(termdate, 'Month DD, YYYY') from
employees where code = 'MM';
to_char
--------------------
April 09, 2002
(1 row)
Ted
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: to_char problem
@ 2002-04-13 17:00 Tom Lane <tgl@sss.pgh.pa.us>
parent: postgresql <pgsql@symcom.com>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2002-04-13 17:00 UTC (permalink / raw)
To: postgresql <pgsql@symcom.com>; +Cc: pgsql-sql
"postgresql" <pgsql@symcom.com> writes:
> Why are there 5 spaces (ascii 32) after the month?
Fixed-width output column (think "September"). Use FM prefix if you
don't want the extra space.
Yeah, it's an ugly formatting language :-(. I think Oracle gets the
blame here...
regards, tom lane
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2002-04-13 17:00 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-04-13 16:57 to_char problem postgresql <pgsql@symcom.com>
2002-04-13 17:00 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox