Re: change natural column order

Поиск
Список
Период
Сортировка
От Dann Corbit
Тема Re: change natural column order
Дата
Msg-id D425483C2C5C9F49B5B7A41F894415470556C2@postal.corporate.connx.com
обсуждение исходный текст
Ответ на change natural column order  ("Joolz" <joolz@arbodienst-limburg.nl>)
Список pgsql-general

-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of gnari
Sent: Tuesday, November 30, 2004 4:48 PM
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] change natural column order

From: "Steve Atkins" <steve@blighty.com>
>
> Would you care to expand on why you think this...
>
>   my $row = $dbh->selectrow_hashref("select * from $table");
>   print 'foo = ', $row{'foo'};
>
> ...is inherently a a code defect?

because it does not work ? (you mean $row->{'foo'})

sorry, could not resist :-)
>>
There is an exception to every rule.  If you need a hash for the whole
row, then you need all the columns.

And while we are at it:
$dbh->selectrow_hashref("SELECT * FROM $table LIMIT 1");
Or something along those lines would be a bit less absurd.
To do a table scan to select a single value is criminal.

"SELECT *" is a horrible disease, coughed up by those who do not know
what they want most of the time.
<<

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

Предыдущее
От: "gnari"
Дата:
Сообщение: Re: Trigger Problems
Следующее
От: "gnari"
Дата:
Сообщение: Re: change natural column order