pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Scott Marlowe <smarlowe@g2switchworks.com>
To: Aaron Bono <postgresql@aranya.com>
Cc: Daryl Richter <daryl@eddl.us>
Cc: pgsql-sql@postgresql.org
Subject: Re: i have table
Date: Wed, 04 Oct 2006 15:11:12 -0500
Message-ID: <1159992672.3800.26.camel@state.g2switchworks.com> (raw)
In-Reply-To: <bf05e51c0610041102o2dd96b81q47fa9a443fc8048@mail.gmail.com>
References: <bf05e51c0610040920x329f3c79u9fdaed0d490f8bb1@mail.gmail.com>
	<C1495BA5.60EC%daryl@eddl.us>
	<bf05e51c0610041102o2dd96b81q47fa9a443fc8048@mail.gmail.com>

On Wed, 2006-10-04 at 13:02, Aaron Bono wrote:
> On 10/4/06, Daryl Richter <daryl@eddl.us> wrote:
>         On 10/4/06 12:20 PM, "Aaron Bono" <postgresql@aranya.com>
>         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.



view thread (19+ messages)  latest in thread

Message-ID: <1159992672.3800.26.camel@state.g2switchworks.com>
Permalink:  ../1159992672.3800.26.camel@state.g2switchworks.com/
Also on:    postgresql.org/message-id/1159992672.3800.26.camel@state.g2switchworks.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-sql@postgresql.org
  Cc: smarlowe@g2switchworks.com, postgresql@aranya.com, daryl@eddl.us
  Subject: Re: i have table
  In-Reply-To: <1159992672.3800.26.camel@state.g2switchworks.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