Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 9B83D9FB426 for ; Wed, 4 Oct 2006 17:15:45 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 50867-02-10 for ; Wed, 4 Oct 2006 17:15:21 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from exchange.g2switchworks.com (mail.g2switchworks.com [63.87.162.25]) by postgresql.org (Postfix) with ESMTP id D06399FB292 for ; Wed, 4 Oct 2006 17:11:14 -0300 (ADT) Received: from 10.10.1.37 ([10.10.1.37]) by exchange.g2switchworks.com ([10.10.1.2]) with Microsoft Exchange Server HTTP-DAV ; Wed, 4 Oct 2006 20:11:12 +0000 Received: from state.g2switchworks.com by mail.g2switchworks.com; 04 Oct 2006 15:11:12 -0500 Subject: Re: i have table From: Scott Marlowe To: Aaron Bono Cc: Daryl Richter , pgsql-sql@postgresql.org In-Reply-To: References: Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1159992672.3800.26.camel@state.g2switchworks.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Wed, 04 Oct 2006 15:11:12 -0500 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.079 tagged_above=0 required=5 tests=AWL, SPF_PASS, UNPARSEABLE_RELAY X-Spam-Level: X-Archive-Number: 200610/52 X-Sequence-Number: 26441 On Wed, 2006-10-04 at 13:02, Aaron Bono wrote: > On 10/4/06, Daryl Richter wrote: > On 10/4/06 12:20 PM, "Aaron Bono" > wrote: > > > > So do it as needed and convert your application slowly. > > > > I just name my views as table_name_vw so all you have to do > is modify your > > queries to hit the _vw instead of just the table. That > shouldn't take much > > time to refactor. > > > I wasn't condoning using select * in your application - if an > application is riddled with that, it is time to start fixing the > problem because it WILL bite you eventually. I never let my team put > select * in any queries that end up in the application code - bad > stuff that! > > Of course sometimes, especially when you are doing quick throw away > queries, select * is nice and controlling the order is handy. It is > also beneficial when using a generic database tool which will almost > definitely do a select *. Actually, the one time I've written an application with select * in it was when I wrote some simple, generic app that used select * to root out the layout of the table and make a simple edit screen for any generic table in postgresql. It used select * from table limit 1 to get the layout, and using libpq was able to find the type of each field and thereby produce a proper update / insert query. But any REAL application should never do that, I agree.