Dmitry Koterov wrote: > > So it would be very useful if Postgres has a special, system ENUM (e.g. > pg_catalog.table_names_enum) which holds names of all tables in the database > (format: schema.table), and their elements are automatically renamed when a > table is renamed. Too late :-) It's regclass you're after I think. => CREATE TABLE track_tables (t regclass); => INSERT INTO track_tables (t) VALUES ('"A"'::regclass); INSERT 0 1 => SELECT * FROM track_tables; t ----- "A" (1 row) => ALTER TABLE "A" RENAME TO atable; ALTER TABLE => SELECT * FROM track_tables; t -------- atable (1 row) -- Richard Huxton Archonet Ltd -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general