Search Postgresql Archives

unable to call a function

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

 



i've write this function that search if inside a specified table there's a
specified value:

CREATE FUNCTION check_if_if_exist(id INTEGER, table_name character(50),
table_column character(20) ) RETURNS BOOLEAN AS $$

BEGIN 
	RETURN EXECUTE 'SELECT EXISTS(SELECT * FROM table_name WHERE table_column =
id)';
END;

$$ LANGUAGE plpgsql

but when i try to call it i always receive an error and the function will
not call. where is the problem?



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


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[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