Re: 'now' doesnt seem to work in stored procedure

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: HK <harikrishnan(at)midascomm(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: 'now' doesnt seem to work in stored procedure
Date: 2002-11-28 15:08:19
Message-ID: 13996.1038496099@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

HK <harikrishnan(at)midascomm(dot)com> writes:
> I am able to execute stored procedures. But sometimes i get this message.
> ERROR: fmgr_info: cache lookup for language 1952725 failed

Sounds like you dropped the plpgsql language while there were still
functions that used it. Not a good thing to do.

(7.3 will prevent you from making this class of mistake, btw)

> Inside a stored procedure i am using 'now' for a datetime value.
> Wat happens is when the stored procedure is loaded, the 'now' is
> initialised and afterwards whenever i use this procedure, the same value
> is being inserted.

Use now() or CURRENT_TIMESTAMP instead of 'now'. The latter gets
reduced "on sight" to a timestamp constant.

regards, tom lane

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message David Scullion 2002-11-28 15:37:57 system cataloge?
Previous Message Henshall, Stuart - Design & Print 2002-11-28 11:42:34 Re: 'now' doesnt seem to work in stored procedure