pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Roland Roberts <roland@astrofoto.org>
To: pgsql-sql@postgresql.org
Subject: Re: my pgsql error?
Date: 14 Mar 2001 12:53:15 -0500
Message-ID: <m2itlcgruc.fsf@tycho.rlent.pnet> (raw)
In-Reply-To: <24923.984581391@sss.pgh.pa.us>
References: <20010314095433.E00372A683@mainbox.archonet.com>
	<24923.984581391@sss.pgh.pa.us>

>>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes:

    >> For a moment I thought you could do to_char(now(),'Day DD Month YYYY'
    >> but you're quite right you need to rtrim() the various pieces.

    Tom> regression=# select to_char(now()-10,'Day DD Month YYYY');
    Tom>            to_char
    Tom> -----------------------------
    Tom>  Sunday    04 March     2001
    Tom> (1 row)

    Tom> regression=# select to_char(now()-10,'fmDay fmDD fmMonth YYYY');
    Tom>        to_char
    Tom> ---------------------
    Tom>  Sunday 4 March 2001
    Tom> (1 row)

    Tom> The 'fm' prefix is not very well explained in the docs at

It doesn't seem to be explained at all, just listed in the table.  I'd
suggest adding the following (and perhaps include your example selects from
above) to the usage notes below table 4-11:

    o to_char() does not remove trailing blanks from fields which are
      blank padded, e.g., `Day' and `Month', unless the `FM' prefix is
      used.

roland
-- 
		       PGP Key ID: 66 BC 3B CD
Roland B. Roberts, PhD                             RL Enterprises
roland@rlenter.com                     76-15 113th Street, Apt 3B
rbroberts@acm.org                          Forest Hills, NY 11375



view thread (7+ messages)

Message-ID: <m2itlcgruc.fsf@tycho.rlent.pnet>
Permalink:  ../m2itlcgruc.fsf@tycho.rlent.pnet/
Also on:    postgresql.org/message-id/m2itlcgruc.fsf@tycho.rlent.pnet

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: roland@astrofoto.org
  Subject: Re: my pgsql error?
  In-Reply-To: <m2itlcgruc.fsf@tycho.rlent.pnet>
  References: <20010314095433.E00372A683@mainbox.archonet.com> <24923.984581391@sss.pgh.pa.us> <m2itlcgruc.fsf@tycho.rlent.pnet>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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