Skip Menu |
 

This queue is for tickets about the DBIx-Class CPAN distribution.

Report information
The Basics
Id: 76960
Status: rejected
Priority: 0/
Queue: DBIx-Class

People
Owner: Nobody in particular
Requestors: fs5 [...] sanger.ac.uk
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.08196
Fixed in: (no value)



Subject: check for reserved words
Download (untitled) / with headers
text/plain 525b
Would it be possible to check (maybe while deploying) column names against reserved words for the various supported database backends? I think this would help to keep the code as portable as possible. I just had a problem where one of my columns was actually called "column", which was fine during development with SQLite but I hit a reserved work in PostgreSQL, requiring quite a lot of changes to the code. the check could be done whenever the schema is deployed and warning messages could indicate such portability issues.
On Thu May 03 05:15:30 2012, fschwach wrote: Show quoted text
> Would it be possible to check (maybe while deploying) column names > against reserved words for the various supported database backends? I > think this would help to keep the code as portable as possible. > I just had a problem where one of my columns was actually called > "column", which was fine during development with SQLite but I hit a > reserved work in PostgreSQL, requiring quite a lot of changes to the code. > the check could be done whenever the schema is deployed and warning > messages could indicate such portability issues.
This should never be necessary. DBIC supports proper quoting for all of its storage backends. Simply use the proper connection_info attribute[1] and your code will be as portable as ever. This is not yet a default due to legacy codebases for which we do not have the proper workaround architecture in place yet. I am closing this ticket as a non-issue, please feel free to reopen it if you have further questions/comments [1] https://metacpan.org/module/DBIx::Class::Storage::DBI#quote_names


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.