Mailing List Archive

Quoting Identifiers
At present Interchange doesn't quote identifiers when making SQL
queries. This just caused an issue for a client of mine who is moving
catalogs from an old version of mysql to a newer one and has a column
name of "condition" which is now a reserved word in mysql (it didn't
used to be). There are also a number of other good reasons to quote
identifiers which I won't enumerate here.

I would just push a patch up for this, except that this does result in a
BC change. When you quote an identifier it becomes case-sensitive, but
unquoted identifiers are not, or (as is the case in postgresql) are
converted to lowercase. Therefore I think it's best to enable it with a
config directive which can be added to the default catalog.cfg so new
catalogs pick up the change, but old ones will need it to be explicitly
enabled if this is desired.

Thoughts?


Peter

_______________________________________________
interchange-users mailing list
interchange-users@icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users
Re: Quoting Identifiers [ In reply to ]
On Fri, 13 Mar 2015, Peter wrote:

> At present Interchange doesn't quote identifiers when making SQL
> queries. This just caused an issue for a client of mine who is moving
> catalogs from an old version of mysql to a newer one and has a column
> name of "condition" which is now a reserved word in mysql (it didn't
> used to be). There are also a number of other good reasons to quote
> identifiers which I won't enumerate here.
>
> I would just push a patch up for this, except that this does result in a
> BC change. When you quote an identifier it becomes case-sensitive, but
> unquoted identifiers are not, or (as is the case in postgresql) are
> converted to lowercase. Therefore I think it's best to enable it with a
> config directive which can be added to the default catalog.cfg so new
> catalogs pick up the change, but old ones will need it to be explicitly
> enabled if this is desired.

It makes sense to me to implement it as a new non-default option.

Jon


--
Jon Jensen
End Point Corporation
https://www.endpoint.com/

_______________________________________________
interchange-users mailing list
interchange-users@icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users