feature request... case sensitivity without double quotes
Hi,
I'm not sure if this is the correct place to make a feature request. If
not hopefully I can be kindly pointed in that direction.
I have several project that use MySQL and I would like to port them to
PostgreSQL unfortunately they use a naming convention which uses upper
case and lower case letters
Example:
SELECT AccountID FROM Account
I am aware that if you enclose those table and column names with " then
postgresql will take the case into consideration. Only problem is most
people who have current MySQL project have not written their statements
with " (MySQL parser uses no quotes of the ` back tick) and it would
take considerable man power to convert each SQL statement.
Perhaps a feature, which is not set by default so it doesn't break
current functionality, can be set so that when creating the database you
can set a flag that will let postgresql know to parse column and table
names that don't have double quotes and still keep the case information.
I'm sure this will help spure more adoption of Postgresql, because
people with serious databases concerns can't use MySQL and for real
production and large scale projects I've purchased commercial databases
because the migration from MySQL to them was easier because of the
different approach to parsing.
Thanks for your time,
Pete
Pete wrote:
I am aware that if you enclose those table and column names with "
then postgresql will take the case into consideration. Only problem
is most people who have current MySQL project have not written their
statements with " (MySQL parser uses no quotes of the ` back tick)
and it would take considerable man power to convert each SQL
statement.
Why would this be a problem, considering that all uses of the same
mixed-case identifier are converted to the same lower-case identifier?
On Thu, 15 Jan 2004, Pete wrote:
Hi,
I'm not sure if this is the correct place to make a feature request. If
not hopefully I can be kindly pointed in that direction.I have several project that use MySQL and I would like to port them to
PostgreSQL unfortunately they use a naming convention which uses upper
case and lower case letters
Example:
SELECT AccountID FROM AccountI am aware that if you enclose those table and column names with " then
postgresql will take the case into consideration. Only problem is most
people who have current MySQL project have not written their statements
with " (MySQL parser uses no quotes of the ` back tick) and it would
take considerable man power to convert each SQL statement.
I've not tried this but if it were me I would try updating the names of the
objects and columns in pg_class and pg_attribute so that they weren't mixed
case. I wonder though, how did these get created in the db in mixed case in the
first place? Your creation scripts must have created them using the double
quotes around the names. That strikes me as an inconsitency which shouldn't
have existed. However, as I say, I'd look at renaming things in the system
tables to try and repair the situation. Don't forget to back everything up
first.
Unfortunately, the folding the lowercase isn't the best since names should be
folded to upper case, however, I'm with the likes of Tom who prefer to see
things in lowercase most of the time. I guess that's what FORTRAN does to
one's brain after a while of trying to read it.
--
Nigel J. Andrews
On Thu, Jan 15, 2004 at 10:02:34PM -0500, Pete wrote:
Hi,
I'm not sure if this is the correct place to make a feature request. If
not hopefully I can be kindly pointed in that direction.I have several project that use MySQL and I would like to port them to
PostgreSQL unfortunately they use a naming convention which uses upper
case and lower case letters
Example:
SELECT AccountID FROM Account
What exactly is the problem?
I can only see a problem when you create two fields/table that
only differ in case.
Being case insensitive should make it easier to port to
postgresql rather than harder.
Kurt