pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jim C. Nasby <jnasby@pervasive.com>
To: Roger Hand <RHand@kailea.com>
Cc: Christopher Kings-Lynne <chriskl@familyhealth.com.au>
Cc: R, Rajesh (STSD) <rajesh.r2@hp.com>
Cc: pgsql-hackers@postgresql.org
Cc: pgsql-performance@postgresql.org
Subject: Re: [HACKERS] Query in SQL statement
Date: Tue, 4 Oct 2005 15:43:43 -0500
Message-ID: <20051004204343.GW40138@pervasive.com> (raw)
In-Reply-To: <DB28E9B548192448A4E8C8A3C1B1E475611D35@sj1-exch-01.us.corp.kailea.com>
References: <DB28E9B548192448A4E8C8A3C1B1E475611D35@sj1-exch-01.us.corp.kailea.com>

On Sat, Oct 01, 2005 at 12:51:08PM -0700, Roger Hand wrote:
> > -----Original Message-----
> > From: pgsql-performance-owner@postgresql.org
> > [mailto:pgsql-performance-owner@postgresql.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);

That will usually work (see Tom's reply), but fieldone is a heck of a
lot harder to read than field_one. But like I said, this is the coding
conventions I've found work well; YMMV.
-- 
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461



view thread (10+ messages)  latest in thread

Message-ID: <20051004204343.GW40138@pervasive.com>
Permalink:  ../20051004204343.GW40138@pervasive.com/
Also on:    postgresql.org/message-id/20051004204343.GW40138@pervasive.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: jnasby@pervasive.com, RHand@kailea.com, chriskl@familyhealth.com.au, rajesh.r2@hp.com, pgsql-hackers@postgresql.org
  Subject: Re: [HACKERS] Query in SQL statement
  In-Reply-To: <20051004204343.GW40138@pervasive.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox