From: Tom Lane <tgl@sss.pgh.pa.us>
To: Luca Clementi <lclement@ucsd.edu>
Cc: pgsql-sql@postgresql.org
Subject: Re: Problem with the to_timestamp function
Date: Wed, 30 Jan 2008 19:26:10 -0500
Message-ID: <27257.1201739170@sss.pgh.pa.us> (raw)
In-Reply-To: <47A10A1D.5020408@ucsd.edu>
References: <47A10A1D.5020408@ucsd.edu>
Luca Clementi <lclement@ucsd.edu> writes:
> It seems that the to_timestamp does not work properly in this case,
> when it comes to parsing the hours.
to_timestamp() is not very robust if the input doesn't exactly match
what it expects for the format string. I'm not sure if that's the
issue here, but have you tried just casting the string to timestamp?
That would use the standard timestamp input converter, which is
pretty flexible.
(BTW, there is definitely 0 hope of recognizing a timezone name that's
written in Chinese characters, unless maybe you fool around with the
timezone-abbreviations configuration file.)
regards, tom lane
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, lclement@ucsd.edu
Subject: Re: Problem with the to_timestamp function
In-Reply-To: <27257.1201739170@sss.pgh.pa.us>
* 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