david, you're right. i didn't realize it had to be executed inside a function so now i'm trying this:
-- create function
create or replace function get_tables(sname varchar) returns record as $$
select tablename from pg_tables where schemaname = $1;
$$ language 'plpgsql';
-- query tables where column 'fname' = 'john'
select * from get_tables('myschema') where fname = 'john';
any help? wishing for a "select * from *..." :)
thanks, jzs
-- create function
create or replace function get_tables(sname varchar) returns record as $$
select tablename from pg_tables where schemaname = $1;
$$ language 'plpgsql';
-- query tables where column 'fname' = 'john'
select * from get_tables('myschema') where fname = 'john';
any help? wishing for a "select * from *..." :)
thanks, jzs