Re: Select all fields except one

Поиск
Список
Период
Сортировка
От Ron Johnson
Тема Re: Select all fields except one
Дата
Msg-id 474DA4DA.6090100@cox.net
обсуждение исходный текст
Ответ на Re: Select all fields except one  (Vivek Khera <khera@kcilink.com>)
Список pgsql-general
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 11/28/07 11:18, Vivek Khera wrote:
>
> On Nov 28, 2007, at 11:06 AM, Matt Doughty wrote:
>
>> Is there a way of selecting all fields except for one in particular?
>> I'd like to create a query that says something like:
>>
>> select * except fieldx
>>
>>
>
> For best practices, you should never use select * in your queries.  You
> will inevitably end up with code that cannot deal with a schema change,
> and for any live system, you will have a schema change at some point...

Remember back in the late-80s when Data Dictionaries were the rage?
 (Some legacy still have these.)  3GL structs/copybooks can be
auto-generated from the CDD, so any added columns are auto-added to
your record structure.

Of course, you still have to rebuild your apps.

> It is best to explicitly list the field names your code is expecting.
> Besides, I don't think you can do what you want to do with just SQL.

- --
Ron Johnson, Jr.
Jefferson LA  USA

%SYSTEM-F-FISH, my hovercraft is full of eels
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFHTaTaS9HxQb37XmcRAiaWAJ9/BiarNsC9UUNyreg8LiIq9+mUKwCeNS/L
1y4DkS4vJbJd15ZbPuwalac=
=QZG7
-----END PGP SIGNATURE-----

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

Предыдущее
От: Erik Jones
Дата:
Сообщение: Re: Config settings for large restore
Следующее
От: mgainty@hotmail.com
Дата:
Сообщение: Re: PostgresSQL vs. Informix