From: | "Roger Hand" <RHand(at)kailea(dot)com> |
---|---|
To: | "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>, "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au> |
Cc: | "R, Rajesh (STSD)" <rajesh(dot)r2(at)hp(dot)com>, <pgsql-hackers(at)postgresql(dot)org>, <pgsql-performance(at)postgresql(dot)org> |
Subject: | Re: [HACKERS] Query in SQL statement |
Date: | 2005-10-01 19:51:08 |
Message-ID: | DB28E9B548192448A4E8C8A3C1B1E475611D35@sj1-exch-01.us.corp.kailea.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-performance |
> -----Original Message-----
> From: pgsql-performance-owner(at)postgresql(dot)org
> [mailto:pgsql-performance-owner(at)postgresql(dot)org]On Behalf Of Jim C. Nasby
> Sent: Friday, September 30, 2005 4:49 PM
> Subject: Re: [PERFORM] [HACKERS] Query in SQL statement
> I suggest ditching the CamelCase and going with underline_seperators.
> I'd also not use the bareword id, instead using bad_user_id. And I'd
> name the table bad_user. But that's just me. :)
I converted a db from MS SQL, where tables and fields were CamelCase, and
just lowercased the ddl to create the tables.
So table and fields names were all created in lowercase, but I didn't have to change
any of the application code: the SELECT statements worked fine with mixed case.
-- sample DDL
CREATE TABLE testtable
(
fieldone int4
)
insert into TestTable (fieldone) values (11);
-- These statements will both work:
-- lowercase
SELECT fieldone FROM testtable;
-- CamelCase
SELECT FieldOne FROM TestTable;
-Roger
> Jim C. Nasby, Sr. Engineering Consultant jnasby(at)pervasive(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2005-10-01 21:01:51 | Re: Proposed patch for sequence-renaming problems |
Previous Message | Hannu Krosing | 2005-10-01 19:32:52 | Re: effective SELECT from child tables |
From | Date | Subject | |
---|---|---|---|
Next Message | AL ELK | 2005-10-01 20:08:31 | Which one FreeBSD or Linux |
Previous Message | Ron Peacetree | 2005-10-01 17:42:32 | Re: [HACKERS] A Better External Sort? |