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

timestamp/function question

From: Soma Interesting <dfunct(at)telus(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: timestamp/function question
Date: 2001-03-29 05:55:58
Message-ID: 5.0.2.1.0.20010328215412.026df008@pop.telus.net (view raw or flat)
Thread:
Lists: pgsql-general
Why does the following code return the exact same value each time, instead 
of a value based on the current time?

CREATE FUNCTION memb_num () RETURNS INT4 AS '
	BEGIN
		RETURN date_part(''epoch'', CURRENT_DATE);
	END;
' LANGUAGE 'plpgsql';


Responses

pgsql-general by date

Next:From: Pruner JanDate: 2001-03-29 05:59:01
Subject: RE: Re: Patch (tiny): \cd (change dir) for psql.
Previous:From: Marc WrubleskiDate: 2001-03-29 05:10:31
Subject: Re: Determine Time in other Time Zone

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