Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql General > Re: Quoting tab...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 15237 of 17602
Post > Topic >>

Re: Quoting table/column names vs performance

by mail@[EMAIL PROTECTED] (Ivan Sergio Borgonovo) Apr 9, 2008 at 08:26 PM

On Wed, 9 Apr 2008 19:11:57 +0200
Alban Hertroys <dalroi@[EMAIL PROTECTED]
> wrote:

> On Apr 9, 2008, at 5:27 PM, Jozef =C5=A0ev=C4=8D=C3=ADk wrote:
> > In MSSQL I had something like:
> > SELECT Column1,Column2 from MyTable
> >
> > In PgSQL I write:
> > SELECT =E2=80=9CColumn1=E2=80=9D, =E2=80=9CColumn2=E2=80=9D from
=E2=80=
=9CMyTable=E2=80=9D
> >
> > Which is fine and working, I have no doubt about it. I=E2=80=99m just=
=20=20
> > guessing if this does not affect performance
> > in any way.
>=20
> What are you trying to fix that you don't just write SELECT=20=20
> Column1,Column2 from MyTable ?
> Postgres understands that fine, why do you want to quote those=20=20
> identifiers? Maybe your application code is case-sensitive with=20=20
> regards to column (and maybe table) names?

There are a couple of small gotcha.

eg.

- PHP actually is case sensitive so:

$row['MyRow'] !=3D $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.


--=20
Ivan Sergio Borgonovo
http://www.webthatworks.it


--=20
Sent via pgsql-general mailing list (pgsql-general@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
 




 1 Posts in Topic:
Re: Quoting table/column names vs performance
mail@[EMAIL PROTECTED] (  2008-04-09 20:26:50 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Dec 1 18:45:11 CST 2008.