Re: plpgsql extract epoch problem - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: plpgsql extract epoch problem
Date
Msg-id 20031022174001.GA11907@dcc.uchile.cl
Whole thread Raw
In response to plpgsql extract epoch problem  (Darren Ferguson <darren@crystalballinc.com>)
List pgsql-general
On Wed, Oct 22, 2003 at 12:50:22PM -0400, Darren Ferguson wrote:

> create or replace function test() returns integer as '
> declare
>  _test timestamp with time zone;
>  _f integer;
> begin
>  _test := current_timestamp;
>  _f := extract(epoch from timestamp _test);

Why not simply
_f := extract(epoch from _test);
?

>  return _f;
> end;' language 'plpgsql';

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Hay que recordar que la existencia en el cosmos, y particularmente la
elaboración de civilizaciones dentre de él no son, por desgracia,
nada idílicas" (Ijon Tichy)

pgsql-general by date:

Previous
From: "Eric Dahnke"
Date:
Subject: Prepared Statements
Next
From: Fernando Nasser
Date:
Subject: Re: