[GRASS-dev] [grass-code I][520] v.overlay: "SQL parser error" if output name is "and", "or" or "not"

Glynn Clements glynn at gclements.plus.com
Fri Oct 26 02:17:52 EDT 2007


Maciej Sieczka wrote:

> > This isn't something which can easily be fixed without breaking
> > existing setups. I'm not even sure that it's possible to detect in
> > advance whether a given name is valid.
> 
> Some not SQL compliant names are already rejected. g.copy again:
> 
> $ g.copy vect=map,1
> Copy vector <map at set1> to current mapset as <1>
> WARNING: Illegal vector map name <1>. Must start with a letter.
> ERROR: Vector map name is not SQL compliant
> 
> Maybe there is a way to extend the test to reject names and,
> or, not? Should xor be rejected too? For now vectors and
> tables named "xor" are allowed and don't trigger SQL parser
> error like and/or/not?

"xor" isn't an SQL keyword.

There is a list of SQL keywords at:

http://www.postgresql.org/docs/8.2/static/sql-keywords-appendix.html

That list has 632 entries; some of them are only reserved in specific
contexts, or in specific versions of the SQL standard. Beyond that,
specific SQL implementations may have their own idea of what is or is
not permissible.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list