| From: | giozh <giozh(at)yahoo(dot)it> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | unable to call a function |
| Date: | 2013-07-04 15:53:28 |
| Message-ID: | 1372953208844-5762590.post@n5.nabble.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
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.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | boraldomaster | 2013-07-04 16:08:12 | Re: How to create a cursor that is independent of transactions and doesn't calculated when created ? |
| Previous Message | Adrian Klaver | 2013-07-04 15:40:57 | Re: Can't create plpython language |