faking writable views as tables

From: Enrico Weigelt <weigelt(at)metux(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: faking writable views as tables
Date: 2005-06-29 11:56:04
Message-ID: 20050629115604.GC15893@nibiru.borg.metux.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Hi folks,

I'm using several writable views (-> update & insert rules)
and got trouble with pgadmin - it refuses to insert/edit
values since it sees the table as a view and believes views
are never writable.

So i've just set the reltype in pg_class to 'r'. The frontends
now see it as a writeble table again, but when dropping the
table, i've got a warning, that some file (seems to be
<oid-of-schema>/<oid-of-table>) could not be deleted.
Is this the table storage file, which simply doesn't exist
on views ?

Are my changes to pg_class dangerous in any way ?

cu
--
---------------------------------------------------------------------
Enrico Weigelt == metux IT service
phone: +49 36207 519931 www: http://www.metux.de/
fax: +49 36207 519932 email: contact(at)metux(dot)de
---------------------------------------------------------------------
Realtime Forex/Stock Exchange trading powered by postgresSQL :))
http://www.fxignal.net/
---------------------------------------------------------------------

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Glaesemann 2005-06-29 12:02:17 Re: truncate all tables?
Previous Message Enrico Weigelt 2005-06-29 11:36:29 Re: Foreign key to a view (UNION of two or more tables),