Search Postgresql Archives

Triggers on Foreign Tables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Not sure if this is a feature request or a bug report.

I'm trying to use Foreign Tables for a variety of things and it is useful to have a foreign table which appears to be read/write.

Having set one up, I can select data from it.   However, I can't insert, update or delete.

No worries, thinks I.  I'll just create an   INSTEAD OF TRIGGER -- and handle the updates that way.

However, one can't create a TRIGGER (in PosgreSQL version 9.2) on a foreign table -- the error message is:  not a table or view.

My current workaround is to create a view which is defined as   CREATE VIEW viewOnForeignTable AS SELECT * FROM foreignTable  

I can then create INSTEAD OF TRIGGERs on viewOnForeignTable, as well as SELECT from viewOnForeignTable -- so that becomes the canonical interface.

However, it seems like it should be just as acceptable to apply the INSTEAD OF TRIGGERs to the FOREIGN TABLE .

Should I consider this a bug (that I can't create aTRIGGER on a foreign table?) or a feature request (to allow creating TRIGGERs on foreign tables)?

Thanks,

r0ml



-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux