Discussion:
How to clone CURRENT_DATE to SYSDATE ?
Emanuel Araújo
2014-09-24 14:39:46 UTC
Permalink
Hi,

I need to clone function CURRENT_DATE to SYSDATE in my PostgreSQL.

Does anybody know how to do that it ?
--
*Atenciosamente,Emanuel Araújo*

*Linux Certified, DBA PostgreSQL*
Adrian Klaver
2014-09-24 19:43:51 UTC
Permalink
Post by Emanuel Araújo
Hi,
I need to clone function CURRENT_DATE to SYSDATE in my PostgreSQL.
Does anybody know how to do that it ?
Not sure what you want?

A clone is an exact replica so cloning CURRENT_DATE would create another
CURRENT_DATE. My guess is that this not what you want.

So do you want to create SYSDATE in Postgres?
Post by Emanuel Araújo
--
*Atenciosamente,
Emanuel Araújo*
*/Linux Certified, DBA PostgreSQL
/*
--
Adrian Klaver
***@aklaver.com
--
Sent via pgsql-general mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Emanuel Araújo
2014-09-25 10:24:12 UTC
Permalink
Thank's Adrian,

I want really create another CURRENT_DATE called SYSDATE.

postgres=# SELECT CURRENT_DATE ;
date
------------
2014-09-25
(1 row)

I need that:

postgres=# SELECT SYSDATE ;
date
------------
2014-09-25

Because, I am trying SymmetricDS between Oracle and PostgreSQL, in my case,
there are a lot of fields with "DEFAULT trunc(sysdate)". This situation
break when I start the sincronization why the data type there isn't in
PostgreSQL.
Post by Adrian Klaver
Post by Emanuel Araújo
Hi,
I need to clone function CURRENT_DATE to SYSDATE in my PostgreSQL.
Does anybody know how to do that it ?
Not sure what you want?
A clone is an exact replica so cloning CURRENT_DATE would create another
CURRENT_DATE. My guess is that this not what you want.
So do you want to create SYSDATE in Postgres?
http://www.postgresql.org/message-id/1409288790481-
Post by Emanuel Araújo
--
*Atenciosamente,
Emanuel Araújo*
*/Linux Certified, DBA PostgreSQL
/*
--
Adrian Klaver
--
*Atenciosamente,Emanuel Araújo*

*Linux Certified, DBA PostgreSQL*
Pavel Stehule
2014-09-25 10:28:55 UTC
Permalink
This post might be inappropriate. Click to display it.
Adrian Klaver
2014-09-25 13:13:40 UTC
Permalink
Post by Emanuel Araújo
Thank's Adrian,
I want really create another CURRENT_DATE called SYSDATE.
postgres=# SELECT CURRENT_DATE ;
date
------------
2014-09-25
(1 row)
postgres=# SELECT SYSDATE ;
date
------------
2014-09-25
Because, I am trying SymmetricDS between Oracle and PostgreSQL, in my
case, there are a lot of fields with "DEFAULT trunc(sysdate)". This
situation break when I start the sincronization why the data type there
isn't in PostgreSQL.
Best guess is the answer lies here:

http://www.symmetricds.org/doc/3.6/user-guide/html/config.html#configuration-transforms
--
Adrian Klaver
***@aklaver.com
--
Sent via pgsql-general mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Loading...