Search Postgresql Archives

case dumbiness in return from functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
       message can get through to the mailing list cleanly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux