Re: Thoughts on "SELECT * EXCLUDING (...) FROM ..."?

Поиск
Список
Период
Сортировка
От Brendan Jurd
Тема Re: Thoughts on "SELECT * EXCLUDING (...) FROM ..."?
Дата
Msg-id CADxJZo3WLHFQL_nmnSP_0MwvvOd9NRY9kyu+7H7VhhdWXAq=MQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Thoughts on "SELECT * EXCLUDING (...) FROM ..."?  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
On 1 November 2011 00:14, Andrew Dunstan <andrew@dunslane.net> wrote:
> On 10/30/2011 10:00 PM, Christopher Browne wrote:
>> I don't think I wish it.  We're telling our developers not to use "select
>> *", and I don't think having "select * except " would change that policy,
>> beyond requiring us to waste time explaining :
>>
>> "No, we're not changing policy.  The fact that PGDG added this to 9.2 does
>> *not* imply our policy was wrong."
>>
>
> That's fine, and it's a good policy. A good policy might well exclude use of
> a number of available features (e.g. one place I know bans doing joins with
> ',' instead of explicit join operators). But I don't think it helps us
> decide what to support.
>
> The fact is that if you have 100 columns and want 95 of them, it's very
> tedious to have to specify them all, especially for ad hoc queries where the
> house SQL standards really don't matter that much.

I couldn't agree more with Andrew's comment.  What's good for an ad
hoc psql query isn't congruent with what's good for your application
queries.

We could have " * EXCLUDING " and still say that it is undesirable in
all the same contexts that " * " is undesirable.

Cheers,
BJ


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

Предыдущее
От: Marti Raudsepp
Дата:
Сообщение: Re: Thoughts on "SELECT * EXCLUDING (...) FROM ..."?
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: IDLE in transaction introspection