Interesting bug report. The problem is that sscanf(buf, %d, val)
eats leading white space, but our functions were not handling that.
I have applied the attached patch that fixes this:
test= select to_timestamp(' 0300','mmdd hh24mi');
to_timestamp
Attachment now attached. :-)
---
Bruce Momjian wrote:
Interesting bug report. The problem is that sscanf(buf, %d, val)
eats leading white space, but our functions were not handling that.
I have applied the attached
.
---
Regards,
mario weilguni
-Urspr?ngliche Nachricht- Von:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Im Auftrag von Tom Lane
Gesendet: Freitag, 07. April 2006 06:09 An: Mario Weilguni Cc:
PostgreSQL-development Betreff: Re: [HACKERS] Strange results from
On 4/7/06, Tom Lane [EMAIL PROTECTED] wrote:
Mario Weilguni [EMAIL PROTECTED] writes:
I think all except the first one should raise a warning, isn't it?
to_timestamp (and friends) all seem to me to act pretty bizarre when
faced with input that doesn't match the given format string. However,
, 07. April 2006 06:09
An: Mario Weilguni
Cc: PostgreSQL-development
Betreff: Re: [HACKERS] Strange results from to_timestamp
Mario Weilguni [EMAIL PROTECTED] writes:
I think all except the first one should raise a warning, isn't it?
to_timestamp (and friends) all seem to me to act pretty bizarre
mydb=# select to_timestamp(' 0300','mmdd hh24mi');
to_timestamp
---
0001-01-01 03:00:00+01 BC
(1 row)
Questionable, but probably valid.
mydb=# select to_timestamp(' 0300','mmdd hh24mi');
to_timestamp
Am Donnerstag, 6. April 2006 14:57 schrieb Mario Weilguni:
mydb=# select to_timestamp(' 0300','mmdd hh24mi');
to_timestamp
---
0001-01-01 03:00:00+01 BC
(1 row)
Questionable, but probably valid.
mydb=# select to_timestamp('
Mario Weilguni [EMAIL PROTECTED] writes:
I think all except the first one should raise a warning, isn't it?
to_timestamp (and friends) all seem to me to act pretty bizarre when
faced with input that doesn't match the given format string. However,
in the end that is an Oracle-compatibility