query on multiple tables in schema - Mailing list pgsql-admin

From Angus Berry
Subject query on multiple tables in schema
Date
Msg-id 1096406359.2215.135.camel@vaio1linux
Whole thread Raw
Responses Re: query on multiple tables in schema  (Bruno Wolff III <bruno@wolff.to>)
List 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.


pgsql-admin by date:

Previous
From: Vangelis Natsios
Date:
Subject: Data Recovery
Next
From: stig erikson
Date:
Subject: Re: fedora core 2 postgresql regression tests fail