X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 14D04DA0B6; Tue, 4 Oct 2005 17:43:44 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 77902-04; Tue, 4 Oct 2005 20:43:41 +0000 (GMT) Received: from flake.decibel.org (flake.decibel.org [67.100.216.10]) by svr1.postgresql.org (Postfix) with ESMTP id 04951DA090; Tue, 4 Oct 2005 17:43:41 -0300 (ADT) Received: by flake.decibel.org (Postfix, from userid 1001) id 7A1EB15255; Tue, 4 Oct 2005 15:43:43 -0500 (CDT) Date: Tue, 4 Oct 2005 15:43:43 -0500 From: "Jim C. Nasby" To: Roger Hand Cc: Christopher Kings-Lynne , "R, Rajesh (STSD)" , pgsql-hackers@postgresql.org, pgsql-performance@postgresql.org Subject: Re: [HACKERS] Query in SQL statement Message-ID: <20051004204343.GW40138@pervasive.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD 4.11-RELEASE-p10 i386 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.9i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.008 required=5 tests=[AWL=0.008] X-Spam-Level: X-Archive-Number: 200510/45 X-Sequence-Number: 14813 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