Search Postgresql Archives

Re: CALL and named parameters

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

 



## Dominique Devienne (ddevienne@xxxxxxxxx):

> dd_v185=> call "Epos-DBA".db_grant_connect_to(grantee_role => 'dd_joe');
> ERROR:  procedure Epos-DBA.db_grant_connect_to(grantee_role =>
> unknown) does not exist
> LINE 1: call "Epos-DBA".db_grant_connect_to(grantee_role => 'dd_joe'...

There's the problem: "unknown" type - consider that string there as
"too flexible", it can be coerced into too many types, so the error
says "unknown".
Consider this demonstration:

db=# call proc1(val => 1);
CALL
db=# call proc1(val => '2');
CALL
db=# call proc1(value => 3);
ERROR:  procedure proc1(value => integer) does not exist
LINE 1: call proc1(value => 3);
             ^
HINT:  No procedure matches the given name and argument types. You might need to add explicit type casts.
db=# call proc1(value => '4');
ERROR:  procedure proc1(value => unknown) does not exist
LINE 1: call proc1(value => '4');
             ^
HINT:  No procedure matches the given name and argument types. You might need to add explicit type casts.
db=# call proc1(value => text '5');
ERROR:  procedure proc1(value => text) does not exist
LINE 1: call proc1(value => text '5');
             ^
HINT:  No procedure matches the given name and argument types. You might need to add explicit type casts.

Regards,
Christoph

-- 
Spare Space





[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 Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux