Vivek,
> JB> Q. What about TIMESTAMP WITH TIME ZONE?
> JB> A. An important topic, and datatype, that I don't want to get
> into here.
> JB> See the PostgreSQL docs.
>
> Those docs are lacking an explanation that there is no such thing in
> PostgreSQL as a timestamp *without* time zone.
Hmmm .
Jeff,
> Why not just include examples of DATEDIFF and DATEADD functions?
> For example:
> CREATE FUNCTION datediff(timestamp, timestamp)
> RETURNS integer AS '
> BEGIN
> RETURN $2 - $1;
> END;
> ' LANGUAGE 'plpgsql';
Not a bad idea. Unfortunately, DATEDIFF & DATEADD are more complicated
than th
> "JB" == Josh Berkus <[EMAIL PROTECTED]> writes:
>> Those docs are lacking an explanation that there is no such thing in
>> PostgreSQL as a timestamp *without* time zone.
JB> Hmmm OK, I'll revise the A: but I *don't* want to go into Time Zone
JB> issues in this intro. Any docs I can
Why not just include examples of DATEDIFF and DATEADD functions?
For example:
CREATE FUNCTION datediff(timestamp, timestamp)
RETURNS integer AS '
BEGIN
RETURN $2 - $1;
END;
' LANGUAGE 'plpgsql';
And similarly with DATEADD.
You will increase the scope (and length) of your article, but only slightly
> "JB" == Josh Berkus <[EMAIL PROTECTED]> writes:
JB> Q. What about TIMESTAMP WITH TIME ZONE?
JB> A. An important topic, and datatype, that I don't want to get into here.
JB> See the PostgreSQL docs.
Those docs are lacking an explanation that there is no such thing in
PostgreSQL as a time