Clarify use of NOW() in pl/pgsql docs

Started by David Fetterover 21 years ago8 messagespatches
Jump to latest
#1David Fetter
david@fetter.org

Folks,

This one from Ben Calvert. It uses the (imho clearer) NOW() rather
than 'NOW' in a PL/PgSQL function example.

Cheers,
D
--
David Fetter david@fetter.org http://fetter.org/
phone: +1 510 893 6100 mobile: +1 415 235 3778

Remember to vote!

Attachments:

now.difftext/plain; charset=us-asciiDownload+2-2
#2Neil Conway
neilc@samurai.com
In reply to: David Fetter (#1)
Re: Clarify use of NOW() in pl/pgsql docs

On Thu, 2005-01-27 at 02:28 -0800, David Fetter wrote:

This one from Ben Calvert. It uses the (imho clearer) NOW() rather
than 'NOW' in a PL/PgSQL function example.

Applied, thanks.

-Neil

#3Michael Glaesemann
grzm@seespotcode.net
In reply to: Neil Conway (#2)
Re: Clarify use of NOW() in pl/pgsql docs

On Feb 10, 2005, at 14:00, Neil Conway wrote:

On Thu, 2005-01-27 at 02:28 -0800, David Fetter wrote:

This one from Ben Calvert. It uses the (imho clearer) NOW() rather
than 'NOW' in a PL/PgSQL function example.

Applied, thanks.

I realize it's a bit late, but it might not be a bad idea to use
CURRENT_TIMESTAMP rather than NOW(), as it's per SQL spec.

Michael Glaesemann
grzm myrealbox com

#4Christopher Kings-Lynne
chriskl@familyhealth.com.au
In reply to: Neil Conway (#2)
Re: Clarify use of NOW() in pl/pgsql docs

This one from Ben Calvert. It uses the (imho clearer) NOW() rather
than 'NOW' in a PL/PgSQL function example.

Applied, thanks.

Why not use CURRENT_TIMSTAMP instead of NOW() everywhere in the docs. I
mean, it's standard and NOW() isn't...

Chris

#5Neil Conway
neilc@samurai.com
In reply to: Michael Glaesemann (#3)
Re: Clarify use of NOW() in pl/pgsql docs

On Thu, 2005-02-10 at 16:32 +0900, Michael Glaesemann wrote:

I realize it's a bit late, but it might not be a bad idea to use
CURRENT_TIMESTAMP rather than NOW(), as it's per SQL spec.

I can't say I can get very excited about it; someone is free to submit a
patch if they like.

-Neil

#6Tom Lane
tgl@sss.pgh.pa.us
In reply to: Neil Conway (#5)
Re: Clarify use of NOW() in pl/pgsql docs

Neil Conway <neilc@samurai.com> writes:

On Thu, 2005-02-10 at 16:32 +0900, Michael Glaesemann wrote:

I realize it's a bit late, but it might not be a bad idea to use
CURRENT_TIMESTAMP rather than NOW(), as it's per SQL spec.

I can't say I can get very excited about it; someone is free to submit a
patch if they like.

Considering that the example in question is embedded in the 100%-not-SQL-
standard language plpgsql, I can't get excited about this either.

regards, tom lane

#7Peter Eisentraut
peter_e@gmx.net
In reply to: Tom Lane (#6)
Re: Clarify use of NOW() in pl/pgsql docs

Tom Lane wrote:

Considering that the example in question is embedded in the
100%-not-SQL- standard language plpgsql, I can't get excited about
this either.

I was under the impression that our PL/pgSQL is at least partially an
attempt to implement SQL:2003, part 4.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

#8Tom Lane
tgl@sss.pgh.pa.us
In reply to: Peter Eisentraut (#7)
Re: Clarify use of NOW() in pl/pgsql docs

Peter Eisentraut <peter_e@gmx.net> writes:

I was under the impression that our PL/pgSQL is at least partially an
attempt to implement SQL:2003, part 4.

No, it's an attempt to emulate Oracle's PL/SQL. Any similarity to spec
documents dated later than the original creation of plpgsql (1998) is
quite accidental...

regards, tom lane