pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Johnston <polobo@yahoo.com>
To: pgsql-bugs@postgresql.org
Subject: Re: BUG #8633: Assigning to a variable named "current_time" gives wrong output
Date: Wed, 27 Nov 2013 08:53:25 -0800 (PST)
Message-ID: <1385571205704-5780604.post@n5.nabble.com> (raw)
In-Reply-To: <CAGrpgQ_6aBgPDXTR3G8KN6tsOuonBdvyXR3UEmB6GFYDqQOm0g@mail.gmail.com>
References: <E1VlhN7-0006I7-1M@wrigleys.postgresql.org>
	<CAGrpgQ_6aBgPDXTR3G8KN6tsOuonBdvyXR3UEmB6GFYDqQOm0g@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

bricklen wrote
> On Wed, Nov 27, 2013 at 7:49 AM, &lt;

> michael.lancaster@.co

> &gt;wrote:
> 
>>
>> Reading the value from a variable named 'current_time' that has a value
>> assigned to it then assigns the value of the function 'current_time'
>> rather
>> than reading the value that was previously assigned.
>>
> 
> I don't think this is a bug, "current_time" is a reserved word. See
> http://www.postgresql.org/docs/current/static/sql-keywords-appendix.html

Agreed; though I am curious why this does not throw an error during the
declaration or assignment. A spurious parser error would be welcomed
compared to silently ignoring the requested action.

David J.




--
View this message in context: http://postgresql.1045698.n5.nabble.com/BUG-8633-Assigning-to-a-variable-named-current-time-gives-wr...
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (6+ messages)  latest in thread

Message-ID: <1385571205704-5780604.post@n5.nabble.com>
Permalink:  ../1385571205704-5780604.post@n5.nabble.com/
Also on:    postgresql.org/message-id/1385571205704-5780604.post@n5.nabble.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: polobo@yahoo.com
  Subject: Re: BUG #8633: Assigning to a variable named "current_time" gives wrong output
  In-Reply-To: <1385571205704-5780604.post@n5.nabble.com>
  References: <E1VlhN7-0006I7-1M@wrigleys.postgresql.org> <CAGrpgQ_6aBgPDXTR3G8KN6tsOuonBdvyXR3UEmB6GFYDqQOm0g@mail.gmail.com> <1385571205704-5780604.post@n5.nabble.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox