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@svana.org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.