[jifty-devel] Perhaps another bug :)
ruslan.zakirov at gmail.com
Wed Mar 22 09:00:09 EST 2006
I think prefixes are from bad style world.
There is easier solution. Many DBs (I hope all) allow you to quote
indentifiers (table names, columns, schema...) in your queries. I sent
such for DBIx::SB and it was applied, but then was reverted because of
Pg which makes quoted indentifiers case-sensetive and this broke RT.
We could apply such change in JDBI, I find case-sensetivity easier to
follow requirement then reserved word, because if you don't know words
of all DBs then your app is not portable, as I remember I wrote that
patch to port RT on Firebird because RT uses identifiers that are
reserved in Firebird.
On 3/22/06, Marc Beyer <djhumbucker at tirwhan.org> wrote:
> Jesse Vincent :
> > The previous poster was correct. Jifty::DBI doesn't go to lengths to
> > stop you from using an SQL reserved word for a column name, which means
> > it might blow up. Should we be trying to protect you from yourself with
> > a list of reserved words?
> Maybe there could be a configuration (or installation) option for
> prepending all created tables and columns with a string? E.g.
> Prefix: ji_
> would create and use the column "ji_order" in the database when
> specified as "order" in the Schema class.
> I'm not sure what kind of runtime penalty that would entail, but it
> would give users who don't want to care about hitting a reserved word an
> easy workaround. Might also be useful if you're mixing Jifty- and
> non-Jifty tables in a single database.
> jifty-devel mailing list
> jifty-devel at lists.jifty.org
Best regards, Ruslan.
More information about the jifty-devel