query on multiple tables in schema

From: Angus Berry <angus(dot)berry(at)elken(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: query on multiple tables in schema
Date: 2004-09-28 21:19:20
Message-ID: 1096406359.2215.135.camel@vaio1linux
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi, I wonder if anyone can help.

I'd like to execute a SQL query that performs an action on all the
(unrelated) tables that I select. The following query doesn't work, but
the subselect (which works) shows what I'm trying to do. All tables have
an identical column called id_num.

delete from
(select tablename from pg_tables where schemaname = 'public')
where id_num = null

I'd appreciate any advice.

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Werner Bohl 2004-09-28 22:48:44 How to install plperl on Windows?
Previous Message Rob Long 2004-09-28 18:12:37 best way to revert back to 7.3.3?