Re: Script errors on run

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: Ralph Smith <smithrn(at)washington(dot)edu>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Script errors on run
Date: 2008-06-04 23:34:21
Message-ID: 20080604162805.T83389@megazone.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 4 Jun 2008, Ralph Smith wrote:

> -- ==========================================
> good_date := to_date(year||'-'||month||'-'||day , 'YYYY-MM-DD') ;
>
> RAISE INFO 'good_date = %', good_date ;
>
> UsecsD := EXTRACT(EPOCH FROM DATE 'good_date') ;

You want something like:
UsecsD := EXTRACT(EPOCH FROM good_date);

Note the lack of single quotes. You want to use the variable's value, not
a literal string with the value 'good_date'.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2008-06-04 23:44:28 Re: full vacuum really slows down query
Previous Message Ralph Smith 2008-06-04 23:28:12 Re: Script errors on run