[GENERAL] Quoting table/column names vs performance

2008-04-09 Thread Jozef Ševčík
Hi all, I just switched from MS SQL to PostgreSQL on project and have question about double-quoting names of fields/tables regarding to performance. In MSSQL I had something like: SELECT Column1,Column2 from MyTable In PgSQL I write: SELECT Column1, Column2 from MyTable Which is fine and

Re: [GENERAL] Quoting table/column names vs performance

2008-04-09 Thread Richard Huxton
Jozef Ševčík wrote: Hi all, I just switched from MS SQL to PostgreSQL on project and have question about double-quoting names of fields/tables regarding to performance. If the cost of quoting column-names is a significant part of your query costs, you must have some very fast queries. I

Re: [GENERAL] Quoting table/column names vs performance

2008-04-09 Thread Jozef Ševčík
pozdravom / Best regards, Jozef Ševčík [EMAIL PROTECTED] +420 608 782 813 -Original Message- From: Richard Huxton [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 09, 2008 5:49 PM To: Jozef Ševčík Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Quoting table/column names vs performance

Re: [GENERAL] Quoting table/column names vs performance

2008-04-09 Thread Richard Huxton
Jozef Ševčík wrote: Richard, thanks for the answer. In fact, I double-quoted identifiers only because PgSQL forced me to do so when using capitalized letters in table/column name. Well, if you don't quote them they get folded to lower-case and you get case-insensitive matching. CREATE

Re: [GENERAL] Quoting table/column names vs performance

2008-04-09 Thread Alban Hertroys
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

Re: [GENERAL] Quoting table/column names vs performance

2008-04-09 Thread Jozef Ševčík
Subject: Re: [GENERAL] Quoting table/column names vs performance 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

Re: [GENERAL] Quoting table/column names vs performance

2008-04-09 Thread Jozef Ševčík
, Jozef Ševčík [EMAIL PROTECTED] +420 608 782 813 -Original Message- From: Richard Huxton [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 09, 2008 6:57 PM To: Jozef Ševčík Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Quoting table/column names vs performance Jozef Ševčík

Re: [GENERAL] Quoting table/column names vs performance

2008-04-09 Thread Craig Ringer
Jozef Ševčík wrote: So it all depends on how table is exactly created, thank you. A last question - is there any way how to 'switch' this for table without re-creating table again ? ALTER TABLE MixedCase RENAME TO lowercase; The double quotes are optional on all lower case identifiers.

Re: [GENERAL] Quoting table/column names vs performance

2008-04-09 Thread Ivan Sergio Borgonovo
On Wed, 9 Apr 2008 19:11:57 +0200 Alban Hertroys [EMAIL PROTECTED] 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