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

RE: [INTERFACES] Functions vs. Columns?????

From: "Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp>
To: "Byron Nikolaidis" <byron(dot)nikolaidis(at)home(dot)com>
Cc: <pgsql-interfaces(at)postgreSQL(dot)org>
Subject: RE: [INTERFACES] Functions vs. Columns?????
Date: 2000-02-16 03:09:17
Message-ID: 001001bf782b$35c6a180$2801007e@tpf.co.jp (view raw or flat)
Thread:
Lists: pgsql-interfaces
> -----Original Message-----
> From: owner-pgsql-interfaces(at)postgreSQL(dot)org
> [mailto:owner-pgsql-interfaces(at)postgreSQL(dot)org]On Behalf Of Byron
> Nikolaidis
> 
> Hi,
> 
> I have a question as to how postgres handles some built-in functions,
> for example:
> 
> Works                        Doesn't Work
> ------                       ------------
> select now();                select now;
> select current_date;         select current_date();
> 
> It seems that there should be some consistency here in the use of
> parenthesis.  I don't really know how these things are handled on the
> backend, but it seems that parenthesis are the more correct way, or at
> least both should be allowed.
> 
> Any thoughts?
>

Parenthesis are needed in order to call functions in PostgreSQL.
current_date isn't a built-in function of PostgreSQL.
It's an SQL standard function and it's a special work of PostgreSQL
parser to change current_date to call another built-in function.
 
Regards.

Hiroshi Inoue
Inoue(at)tpf(dot)co(dot)jp

In response to

pgsql-interfaces by date

Next:From: Joseph ShraibmanDate: 2000-02-16 03:26:11
Subject: Re: [INTERFACES] DELETEs with jdbc
Previous:From: Byron NikolaidisDate: 2000-02-16 02:00:52
Subject: Functions vs. Columns?????

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