Re: BUG #13502: parser misconstrues table alias - Mailing list pgsql-bugs

From David G. Johnston
Subject Re: BUG #13502: parser misconstrues table alias
Date
Msg-id CAKFQuwYx8nwg-uJ89FOd-Z=CaDQ-CR61m5Q5L43vnR_BCZHGmQ@mail.gmail.com
Whole thread Raw
In response to BUG #13502: parser misconstrues table alias  (floriparob@gmail.com)
List pgsql-bugs
On Wednesday, July 15, 2015, <floriparob@gmail.com> wrote:

> The following bug has been logged on the website:
>
> Bug reference:      13502
> Logged by:          Robert Stone
> Email address:      floriparob@gmail.com <javascript:;>
> PostgreSQL version: 9.4.4
> Operating system:   Debian stretch/sid
> Description:
>
> I aliased a table using the letters TO and the parser pulled an error.
> Happens in psql as well as the JDBC driver.
> By altering the table alias to TOL overcame the problem.
>
>
Since TO is fully reserved in the SQL syntax, including PostgreSQL's
implementation, this is not surprising.  If you really want to use those
letters you need to double-quite them.  "TO".column_name.

 http://www.postgresql.org/docs/9.4/interactive/sql-keywords-appendix.html

David J.

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #13502: parser misconstrues table alias
Next
From: pinker
Date:
Subject: Interval - incorrect grammar form