From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
---|---|
To: | Luis D(dot) García <ldgarc(at)gmail(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Make TIMESTAMP + TIME in the source code |
Date: | 2007-03-20 23:00:52 |
Message-ID: | 20070320230052.GD24108@svana.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Mar 19, 2007 at 06:16:57PM -0400, Luis D. García wrote:
> Hello, I'm writinng again because I need to make some validation for
> the incoming data (VALUES... on the INSERT-Stmt). This validation
> is based on adding a TIMESTAMP and a TIME kind of data.
>
> >From the Shell I can make:
>
> template1=# select timestamp '02/03/85 7:00pm'+'00:00:02.3450' as
> "TIMESTAMP+TIME";
You're confused. You're not adding TIME, you're adding an INTERVAL,
which is something quite different.
> That's exactly wath I need to do, obtain the result from adding a TIMESTAMP
> and a TIME, but I must do it from the Postgre's source code, since I'm
> working
> on modifying Postgres for a University Project (here in Venezuela we call it
> "Tesis" or "Graduation Special Work".
Well, any function you can call from SQL you can call from C, see the
OidFunctionCall functions.
> PD: in adition, both data (TIMESTAMP and TIME) are stored in strings (char
> *).
Err, why, when there are perfectly good datatypes to store that type of
data.
Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.
From | Date | Subject | |
---|---|---|---|
Next Message | Joshua D. Drake | 2007-03-20 23:03:24 | Re: Bitmapscan changes - Requesting further feedback |
Previous Message | Bruce Momjian | 2007-03-20 22:57:53 | Re: Bug in CREATE/DROP TABLESPACE command |