Re: i have table

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: i have table
Дата
Msg-id 1159992672.3800.26.camel@state.g2switchworks.com
обсуждение исходный текст
Ответ на Re: i have table  ("Aaron Bono" <postgresql@aranya.com>)
Список pgsql-sql
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.


В списке pgsql-sql по дате отправления:

Предыдущее
От: "Hector Villarreal"
Дата:
Сообщение: Re: Assigning a timestamp without timezone to a timestamp
Следующее
От:
Дата:
Сообщение: Re: i have table