Re: Quoting table/column names vs performance
От | Ivan Sergio Borgonovo |
---|---|
Тема | Re: Quoting table/column names vs performance |
Дата | |
Msg-id | 20080409202650.43349558@webthatworks.it обсуждение исходный текст |
Ответ на | Re: Quoting table/column names vs performance (Alban Hertroys <dalroi@solfertje.student.utwente.nl>) |
Список | pgsql-general |
On Wed, 9 Apr 2008 19:11:57 +0200 Alban Hertroys <dalroi@solfertje.student.utwente.nl> wrote: > On Apr 9, 2008, at 5:27 PM, Jozef Ševčík wrote: > > In MSSQL I had something like: > > SELECT Column1,Column2 from MyTable > > > > In PgSQL I write: > > SELECT “Column1”, “Column2” from “MyTable” > > > > Which is fine and working, I have no doubt about it. I’m just > > guessing if this does not affect performance > > in any way. > > What are you trying to fix that you don't just write SELECT > Column1,Column2 from MyTable ? > Postgres understands that fine, why do you want to quote those > identifiers? Maybe your application code is case-sensitive with > regards to column (and maybe table) names? There are a couple of small gotcha. eg. - PHP actually is case sensitive so: $row['MyRow'] != $row['myrow'] If you used camel case in pg without quotes it will be a pain. - Some pg functions aren't case-proof eg. pg_get_serial_sequence I'm thinking to write a script to quote all identifiers... but I'm worried it will look to much as a parser rather than a simple sed script since I got trapped by the above too. -- Ivan Sergio Borgonovo http://www.webthatworks.it
В списке pgsql-general по дате отправления: