[Dbix-class] Automatic quoting

Darren Duncan darren at darrenduncan.net
Wed Jun 9 03:38:02 GMT 2010


Will Hawes wrote:
> Yesterday a colleague new to DBIC ran into a problem with a column
> named using a reserved word in MySQL. He worked around it by using a
> different column name, but while discussing the issue he asked why
> quote_char and name_sep are not set automatically. I don't know the
> answer and Googling has left me none the wiser.

The semantics of SQL are different depending on whether identifier names are 
quoted or barewords; according to the standard and some DBMSs, bareword 
identifiers match case-insensitively while quoted ones match case-sensitively. 
Therefore, identifiers being automatically quoted or not quoted would have 
different semantics.  So the semantics of DBIC would be different if it 
automatically did or didn't quote identifiers, all other things being equal.

-- Darren Duncan



More information about the DBIx-Class mailing list