Unix Technical Forum

Re: Strange results from to_timestamp

This is a discussion on Re: Strange results from to_timestamp within the pgsql Hackers forums, part of the PostgreSQL category; --> to_timestamp is only for Oracle compatibility? I always thought it's some sort of sql standard. What's the sql compliant ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Hackers

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-12-2008, 01:54 AM
Mario Weilguni
 
Posts: n/a
Default Re: Strange results from to_timestamp

to_timestamp is only for Oracle compatibility? I always thought it's some sort of sql standard. What's the sql compliant way to do this?

Regards,
mario weilguni


-----Ursprüngliche Nachricht-----
Von: pgsql-hackers-owner@postgresql.org [mailtogsql-hackers-owner@postgresql.org] Im Auftrag von Tom Lane
Gesendet: Freitag, 07. April 2006 06:09
An: Mario Weilguni
Cc: PostgreSQL-development
Betreff: Re: [HACKERS] Strange results from to_timestamp

Mario Weilguni <mweilguni@sime.com> 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 function, and there is only one measure of what it should do: what does Oracle do in the same case.
Can anyone try these examples on a recent Oracle version?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-12-2008, 02:03 AM
Bruce Momjian
 
Posts: n/a
Default Re: Strange results from to_timestamp

Mario Weilguni wrote:
> to_timestamp is only for Oracle compatibility? I always thought it's
> some sort of sql standard. What's the sql compliant way to do this?


There isn't a standard method, which is why we added Oracle functions.

---------------------------------------------------------------------------


>
> Regards,
> mario weilguni
>
>
> -----Urspr?ngliche Nachricht----- Von:
> pgsql-hackers-owner@postgresql.org
> [mailtogsql-hackers-owner@postgresql.org] Im Auftrag von Tom Lane
> Gesendet: Freitag, 07. April 2006 06:09 An: Mario Weilguni Cc:
> PostgreSQL-development Betreff: Re: [HACKERS] Strange results from
> to_timestamp
>
> Mario Weilguni <mweilguni@sime.com> 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 function, and there is only
> one measure of what it should do: what does Oracle do in the same case.
> Can anyone try these examples on a recent Oracle version?
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match
>


--
Bruce Momjian http://candle.pha.pa.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 12:09 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com