Unix Technical Forum

Re: [GENERAL] Allowing SYSDATE to Work

This is a discussion on Re: [GENERAL] Allowing SYSDATE to Work within the pgsql Hackers forums, part of the PostgreSQL category; --> Matt, > I now agree completely. My purpose is to migrate Oracle databases to > Posgres, and I had ...


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

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #11 (permalink)  
Old 04-12-2008, 05:38 AM
Josh Berkus
 
Posts: n/a
Default Re: [GENERAL] Allowing SYSDATE to Work

Matt,

> I now agree completely. My purpose is to migrate Oracle databases to
> Posgres, and I had thought that Oracle didn't support CURRENT_DATE,
> CURRENT_TIMESTAMP, and so on. However, I've just learned otherwise. So,
> I think the proper migration process for a production database would be
> to first change the Oracle DB to use CURRENT_DATE (or some other
> standard psuedo column), since that will work properly under both Oracle
> and Postgres.


Yep, or use the Orafce project. We're happy to support compatibility syntax
in completely separate add-in projects. Just not in the core code.

--
Josh Berkus
PostgreSQL @ Sun
San Francisco

---------------------------(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
  #12 (permalink)  
Old 04-12-2008, 05:39 AM
Alvaro Herrera
 
Posts: n/a
Default Re: [GENERAL] Allowing SYSDATE to Work

Josh Berkus wrote:
> Matt,
>
> > I now agree completely. My purpose is to migrate Oracle databases to
> > Posgres, and I had thought that Oracle didn't support CURRENT_DATE,
> > CURRENT_TIMESTAMP, and so on. However, I've just learned otherwise. So,
> > I think the proper migration process for a production database would be
> > to first change the Oracle DB to use CURRENT_DATE (or some other
> > standard psuedo column), since that will work properly under both Oracle
> > and Postgres.

>
> Yep, or use the Orafce project. We're happy to support compatibility syntax
> in completely separate add-in projects. Just not in the core code.


How does Orafce allow for grammar extensions like what would be needed
for SYSDATE to work? (Note no parens)

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 04-12-2008, 05:39 AM
Jonah H. Harris
 
Posts: n/a
Default Re: [GENERAL] Allowing SYSDATE to Work

On 11/19/06, Alvaro Herrera <alvherre@commandprompt.com> wrote:
> How does Orafce allow for grammar extensions like what would be needed
> for SYSDATE to work? (Note no parens)


IIRC, it doesn't handle SYSDATE as that would require a change to the grammar.

--
Jonah H. Harris, Software Architect | phone: 732.331.1300
EnterpriseDB Corporation | fax: 732.331.1301
33 Wood Ave S, 2nd Floor | jharris@enterprisedb.com
Iselin, New Jersey 08830 | http://www.enterprisedb.com/

---------------------------(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
  #14 (permalink)  
Old 04-12-2008, 05:39 AM
Gurjeet Singh
 
Posts: n/a
Default Re: [GENERAL] Allowing SYSDATE to Work

On 11/18/06, Matt Miller <pgsql@mattmillersf.fastmail.fm> wrote:
>
> So,
> I think the proper migration process for a production database would be
> to first change the Oracle DB to use CURRENT_DATE (or some other
> standard psuedo column), since that will work properly under both Oracle
> and Postgres.
>


Correct approach. BTW, have you given EnterpriseDB a try?


--
gurjeet[.singh]@EnterpriseDB.com
singh.gurjeet@{ gmail | hotmail | yahoo }.com

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #15 (permalink)  
Old 04-12-2008, 05:47 AM
Jim Nasby
 
Posts: n/a
Default Re: [GENERAL] Allowing SYSDATE to Work

On Nov 21, 2006, at 10:59 AM, Matt Miller wrote:
>> BTW, have you given EnterpriseDB a try?

>
> I looked at it a year or more ago, but I decided it wasn't the type of
> approach I wanted. I want to focus on getting Oracle DBs migrated to
> Postgres proper. If I have to hack Postgres to ease the transition
> I'd
> rather do that than migrate to another commercial offering.
>
> Thanks for the reminder, though, I'll probably take another look, just
> to see what they're up to.


Well, EnterpriseDB supports both PostgreSQL and Oracle syntax, so it
does ease migration since you don't have to migrate every last piece
of code at once. It'd probably be worth your time to download it and
give it a try, but then again I'm biased.
--
Jim Nasby jim@nasby.net
EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)



---------------------------(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
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:26 AM.


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