case dumbiness in return from functions

Поиск
Список
Период
Сортировка
От Ivan Sergio Borgonovo
Тема case dumbiness in return from functions
Дата
Msg-id 20080118005419.63ab5321@webthatworks.it
обсуждение исходный текст
Ответы Re: case dumbiness in return from functions  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
After discovering that pg_get_serial_sequence behaves in a bit
strange way[1] when it deals to case sensitiveness... I just
discovered that you've the same behaviour for any function... at
least in PHP.

postgresql
Versione: 8.1.11
php:
Versione: 5.2.0

eg.

create or replace function testA(out pIpPo int) as
$$
begin
  pIpPo:=7;
  return;
end;
$$ language plpgsql;

...

$result=pg_query('select pIpPo from testA()');
$row=pg_fetch_array($result);
print(var_export($row));

array ( 'pippo' => '7', )

that makes
$ImSoSad=$row['pIpPo'];
return null

And 2h went trying to understand where a session went lost :(

Fortunately it can be fixed at a small price with an alias... but
still I find it a pain.
Whan you've identifiers composed of more than 2 words, camel case can
make your code lines much shorter.

Please, please, please... fix this. Minor things like this can make
coding in Postgres MUCH more enjoyable.

[1] this is documented... is this awwwww bwaaaa bwaaaaaa behaviour of
functions documented as well?

--
Ivan Sergio Borgonovo
http://www.webthatworks.it


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Trouble with UTF-8 data
Следующее
От: Tom Lane
Дата:
Сообщение: Re: case dumbiness in return from functions