Expand|Select|Wrap|Line Numbers
- CREATE OR REPLACE FUNCTION schema._pg_object_getobjectlist(varchar)
- RETURNS refcursor AS
- '
- DECLARE
- columnid int4;
- search_string varchar;
- temp refcursor;
- rc refcursor;
- BEGIN
- search_string := \'%\' || $1 || \'%\';
- ----------------------------------------------------------------------------
- -- clean-up temporary object list table before populating it with data
- ----------------------------------------------------------------------------
- DELETE FROM schema.tempobjectlist;
- OPEN temp FOR SELECT idobject FROM schema.strnodeprops
- WHERE spropertyvalue LIKE search_string;
- LOOP
- FETCH temp INTO columnid;
- EXIT WHEN NOT FOUND;
- PERFORM schema._pg_object_utility(columnid);
- END LOOP;
- CLOSE temp;
- ----------------------------------------------------------------------------
- -- make up a reference to the resulting table and return it to an external
- -- program
- ----------------------------------------------------------------------------
- OPEN rc FOR SELECT * FROM schema.tempobjectlist;
- RETURN rc;
- END;
- '
- LANGUAGE 'plpgsql';
error is
syntax error at or near
line3 columnid int4;