Re: SELECT EXTRACT doesn't work with variables?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Masaru Sugawara <rk73(at)sea(dot)plala(dot)or(dot)jp>
Cc: cmarin(at)dims(dot)com, pgsql-general(at)postgresql(dot)org
Subject: Re: SELECT EXTRACT doesn't work with variables?
Date: 2002-12-18 15:59:50
Message-ID: 23146.1040227190@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Masaru Sugawara <rk73(at)sea(dot)plala(dot)or(dot)jp> writes:
> Conxita Marn <comarin(at)telefonica(dot)net> wrote:
>> aux2 = SELECT EXTRACT(EPOCH FROM TIMESTAMP aux);

> Instead of this line, I think you need to execute the following statement:

> SELECT INTO aux2 EXTRACT(EPOCH FROM aux);

Or

aux2 = EXTRACT(EPOCH FROM TIMESTAMP aux);

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message scott.marlowe 2002-12-18 16:07:19 Re: To many connections Error
Previous Message Tom Lane 2002-12-18 15:56:50 Re: ORDER BY random() LIMIT 1 slowness