Re: Calculation error

From: chestie <mcit(at)argus(dot)net(dot)au>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: chestie <mcit(at)argus(dot)net(dot)au>, pgsql-novice(at)postgresql(dot)org
Subject: Re: Calculation error
Date: 2003-06-05 02:28:27
Message-ID: 87adcxgsvo.fsf@argus.net.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:

> chestie <mcit(at)argus(dot)net(dot)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.

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2003-06-05 03:17:25 Re: Calculation error
Previous Message chestie 2003-06-05 01:17:15 Re: Calculation error