Re: [HACKERS] Strange results from to_timestamp

2006-04-19 Thread Bruce Momjian
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

Re: [HACKERS] Strange results from to_timestamp

2006-04-19 Thread Bruce Momjian
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

Re: [HACKERS] Strange results from to_timestamp

2006-04-18 Thread Bruce Momjian
. --- 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

Re: [HACKERS] Strange results from to_timestamp

2006-04-07 Thread Adrian Maier
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,

Re: [HACKERS] Strange results from to_timestamp

2006-04-07 Thread Mario Weilguni
, 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

[HACKERS] Strange results from to_timestamp

2006-04-06 Thread 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(' 0300','mmdd hh24mi'); to_timestamp

Re: [HACKERS] Strange results from to_timestamp

2006-04-06 Thread Mario Weilguni
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('

Re: [HACKERS] Strange results from to_timestamp

2006-04-06 Thread Tom Lane
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