Re: BUG #8633: Assigning to a variable named "current_time" gives wrong output

From: David Johnston <polobo(at)yahoo(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #8633: Assigning to a variable named "current_time" gives wrong output
Date: 2013-11-27 16:53:25
Message-ID: 1385571205704-5780604.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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

> michael(dot)lancaster(at)(dot)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-wrong-output-tp5780601p5780604.html
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message jjeffman 2013-11-27 17:45:02 BUG #8639: installation failure
Previous Message bricklen 2013-11-27 16:42:48 Re: BUG #8633: Assigning to a variable named "current_time" gives wrong output