Re: unable to call a function - Mailing list pgsql-general

From giozh
Subject Re: unable to call a function
Date
Msg-id 1372958098140-5762605.post@n5.nabble.com
Whole thread Raw
In response to Re: unable to call a function  (Adrian Klaver <adrian.klaver@gmail.com>)
Responses Re: unable to call a function  (Adrian Klaver <adrian.klaver@gmail.com>)
Re: unable to call a function  (Adrian Klaver <adrian.klaver@gmail.com>)
List pgsql-general
something gone wrong the same...

REATE OR REPLACE FUNCTION check_if_if_exist(id integer, table_name
character, table_column character)
  RETURNS boolean AS
$BODY$

DECLARE res BOOLEAN;

BEGIN
    EXECUTE 'SELECT EXISTS(SELECT * FROM'||table_name||
        'WHERE'||table_column||'='||$1||')' INTO res USING id;
    RETURN res;
END;

select check_if_exist(10, 'prova', 'identificatore');


RROR:  function check_if_exist(integer, unknown, unknown) does not exist
LINE 1: select check_if_exist(10, 'prova', 'identificatore');
               ^
HINT:  No function matches the given name and argument types. You might need
to add explicit type casts.



--
View this message in context: http://postgresql.1045698.n5.nabble.com/unable-to-call-a-function-tp5762590p5762605.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: unable to call a function
Next
From: Adrian Klaver
Date:
Subject: Re: unable to call a function