Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VliMm-0006um-FQ for pgsql-bugs@arkaria.postgresql.org; Wed, 27 Nov 2013 16:53:32 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VliMl-00034G-TK for pgsql-bugs@arkaria.postgresql.org; Wed, 27 Nov 2013 16:53:31 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VliMk-00032b-2d for pgsql-bugs@postgresql.org; Wed, 27 Nov 2013 16:53:30 +0000 Received: from sam.nabble.com ([216.139.236.26]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VliMh-00068l-70 for pgsql-bugs@postgresql.org; Wed, 27 Nov 2013 16:53:29 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1VliMf-0000OG-N6 for pgsql-bugs@postgresql.org; Wed, 27 Nov 2013 08:53:25 -0800 Date: Wed, 27 Nov 2013 08:53:25 -0800 (PST) From: David Johnston To: pgsql-bugs@postgresql.org Message-ID: <1385571205704-5780604.post@n5.nabble.com> In-Reply-To: References: Subject: Re: BUG #8633: Assigning to a variable named "current_time" gives wrong output MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: 1.8 (+) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org bricklen wrote > On Wed, Nov 27, 2013 at 7:49 AM, < > michael.lancaster@.co > >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. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs