Re: Calculation error - Mailing list pgsql-novice

From chestie
Subject Re: Calculation error
Date
Msg-id 87adcxgsvo.fsf@argus.net.au
Whole thread Raw
In response to Calculation error  (Wil Duis <Wil.Duis@asml.com>)
List pgsql-novice
Tom Lane <tgl@sss.pgh.pa.us> writes:

> chestie <mcit@argus.net.au> writes:
>> I kept getting this same error, heres what I was trying to do.
>
>>   it := select int4(extract(epoch from timestamp $1 -
>>            extract(epoch from timestamp $2));
>
> You should just write
>
>   it := select int4(extract(epoch from $1) -
>            extract(epoch from $2));

It works (without the select, my fault).

> You are confusing the syntax

I'm just confused in general. :)
Thanks for the explanation.


pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: Updatable view does not work [oops, quite long!]
Next
From: Tom Lane
Date:
Subject: Re: Calculation error