Skip site navigation (1) Skip section navigation (2)

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

From: HK <harikrishnan(at)midascomm(dot)com>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: Re: 'now' doesnt seem to work in stored procedure
Date: 2002-11-29 09:15:08
Message-ID: Pine.LNX.4.33.0211291439020.28480-100000@daisy.midascomm.com (view raw or flat)
Thread:
Lists: pgsql-novice
hi all,

thanx a lot tom, stuart.
I think using CURRENT_TIMESTAMP will be better, as it will not have the 
overhead of a function call.

I have one more problem. I am using postgreSQL 7.1.3 from a C application.
I am using asyncronous query processing. If the postgreSQL server is shut 
or crashed while the application is running, is there any way i can know 
that something went bad at the backend.
help me.
--
regards,
hari

On Thu, 28 Nov 2002, Tom Lane wrote:

> 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

pgsql-novice by date

Next:From: David C.OshelDate: 2002-11-29 20:17:06
Subject: 7.3 and Mac OS X 10.2.2
Previous:From: Oliver ElphickDate: 2002-11-29 05:02:33
Subject: Re: joins

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group