Re: insert a SYSTIMESTAMP value in postgres

From: "David Johnston" <polobo(at)yahoo(dot)com>
To: "'Leon Match'" <leon(dot)match(at)convergia(dot)net>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: insert a SYSTIMESTAMP value in postgres
Date: 2011-06-20 19:52:59
Message-ID: 009c01cc2f83$a8f43660$fadca320$@yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Please look at the section on Date/Time Functions in the PostgreSQL
documentation (Section 9.9 in Version 9.0 documentation) for a full listing
of the date and time functions available in PostgreSQL and how they work.
There is a sub-section (9.9.4) that specifically details functions that
return the current time. Feel free to post with whichever function you feel
is the correct one if you are still unsure after looking at the available
options.

Your conversion from Oracle to PostgreSQL is going to go VERY slowly if you
are going to ask a question for every syntax or feature that exists in
Oracle that is different in PostgreSQL. You need to understand WHAT the
original code is doing and then at least look for what feature/syntax in
PostgreSQL will accomplish the same result.

Personally I can see where the missing MERGE feature maybe warrants a list
posting but, really, getting the "Current Time" from a function call is
basic functionality that you can be expected to be readily found in the
PostgreSQL documentation if you had attempted to look.

There are some articles in the WIKI about database migrations that may be
worth a read as well - though I have not perused them myself.

No disrespect intended, and the community appreciates newcomers, but please
at least look through the extensive documentation before posting any more
"how do I do this in PostgreSQL" questions. Then, if you still need to
post, try describe what you are trying to accomplish WITHOUT resorting to
posting Oracle code (code is OK but odds are many/most people on this list
have never used Oracle). In this instance, "SYSTIMESTMP" looks like a
function but we do not know for sure. And does it return a clock-time or a
session-time?

David J.

From: pgsql-general-owner(at)postgresql(dot)org
[mailto:pgsql-general-owner(at)postgresql(dot)org] On Behalf Of Leon Match
Sent: Monday, June 20, 2011 3:33 PM
To: pgsql-general(at)postgresql(dot)org
Subject: [GENERAL] insert a SYSTIMESTAMP value in postgres

Hello,

I am trying to re-create few objects from oracle into postgres.

I have a problem inserting a timestamp value into the table:

insert into request_queue (request_id, received_time

)

values (new.request_id, SYSTIMESTAMP

);

How can I insert a dynamic timestamp value in postgress, please?

Thank you,

Leon

leon(dot)match(at)convergia(dot)net

In response to

Browse pgsql-general by date

  From Date Subject
Next Message hyelluas 2011-06-20 20:46:07 Re: how to find a tablespace for the table?
Previous Message Scott Ribe 2011-06-20 19:47:55 Re: insert a SYSTIMESTAMP value in postgres