From: | David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Reserved keywords and qualified identifiers |
Date: | 2014-09-19 07:04:39 |
Message-ID: | 1411110279885-5819601.post@n5.nabble.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
cowwoc wrote
> Hi,
>
> http://dev.mysql.com/doc/refman/5.7/en/reserved-words.html explicitly
> states that qualified identifiers do not have to be quoted even if they
> are reserved keywords ("A word that follows a period in a qualified name
> must be an identifier, so it need not be quoted even if it is reserved").
>
> http://www.postgresql.org/docs/9.3/static/sql-keywords-appendix.html does
> not seem to discuss this topic but empirical evidence seems to indicate
> PostgreSQL shares the same behavior.
>
> Is it possible to document the expected behavior? I need to know this
> information to fix this related bug:
> https://github.com/querydsl/querydsl/issues/936
>
> Thanks,
> Gili
It isn't a conscious decision - the logic noted in MySQL applies here as
well: the parser is never faced with an ambigious situation which would
cause a syntax error so the use of quotes to dis-ambiguity is not required.
Though the other effects of (reasons for) quoting identifiers in PostgreSQL
still apply.
Given your empirical evidence and the above logic it's safe to say that the
behavior you see is expected.
David J.
--
View this message in context: http://postgresql.1045698.n5.nabble.com/Reserved-keywords-and-qualified-identifiers-tp5819597p5819601.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.
From | Date | Subject | |
---|---|---|---|
Next Message | Alban Hertroys | 2014-09-19 07:12:20 | Re: cloning database |
Previous Message | Alban Hertroys | 2014-09-19 06:58:41 | Re: Re: How can i monitor exactly what (partition) tables are accessed by a query? |