Thread: Updateable Views or Synonyms.

Updateable Views or Synonyms.

From
Tim Uckun
Date:
I am wondering if either of these features are on the plate for
postgres anytime soon? I see conversations going back to 2007 on
updateable views and some conversations about synonyms but obviously
they have never been added to the database for some reason or another.

With regards to synonyms. It seems to me I could kind of achieve the
same functionality by creating a dblink into the same database. Would
that be an insane?

Re: Updateable Views or Synonyms.

From
Jeff Davis
Date:
On Wed, 2012-05-30 at 11:16 +1200, Tim Uckun wrote:
> I am wondering if either of these features are on the plate for
> postgres anytime soon? I see conversations going back to 2007 on
> updateable views and some conversations about synonyms but obviously
> they have never been added to the database for some reason or another.

Neither of these has active development right now, as far as I know.
Updatable views will appear sometime, I'm sure, but I don't know when.

Synonyms sound fairly simple, but I believe there are some concerns
around catalog bloat and catalog lookup time. I can't remember the
details.

> With regards to synonyms. It seems to me I could kind of achieve the
> same functionality by creating a dblink into the same database. Would
> that be an insane?

You'd be working outside of the transaction, so it seems like you're
losing a lot there. How does it help you?

Regards,
    Jeff Davis


Re: Updateable Views or Synonyms.

From
Alban Hertroys
Date:
On 30 May 2012, at 1:16, Tim Uckun wrote:

> I am wondering if either of these features are on the plate for
> postgres anytime soon? I see conversations going back to 2007 on
> updateable views and some conversations about synonyms but obviously
> they have never been added to the database for some reason or another.


You can create updateable views by adding INSERT, UPDATE and DELETE rules to them.

Alban Hertroys

--
The scale of a problem often equals the size of an ego.



Re: Updateable Views or Synonyms.

From
Raghavendra
Date:

On Wed, May 30, 2012 at 12:38 PM, Alban Hertroys <haramrae@gmail.com> wrote:
On 30 May 2012, at 1:16, Tim Uckun wrote:

> I am wondering if either of these features are on the plate for
> postgres anytime soon? I see conversations going back to 2007 on
> updateable views and some conversations about synonyms but obviously
> they have never been added to the database for some reason or another.



You can also create a updateable VIEW using "INSTEAD OF" trigger which is a new feature in PG 9.1.

---
Regards,
Raghavendra
EnterpriseDB Corporation

Re: Updateable Views or Synonyms.

From
Jasen Betts
Date:
On 2012-05-29, Tim Uckun <timuckun@gmail.com> wrote:
> I am wondering if either of these features are on the plate for
> postgres anytime soon? I see conversations going back to 2007 on
> updateable views and some conversations about synonyms but obviously
> they have never been added to the database for some reason or another.

updateable views can be implemented using rules

> With regards to synonyms. It seems to me I could kind of achieve the
> same functionality by creating a dblink into the same database. Would
> that be an insane?

what sorts of operations do synonyms need to support?
truncate?
alter table?
reindex?

--
⚂⚃ 100% natural

Re: Updateable Views or Synonyms.

From
Tim Uckun
Date:
>
> what sorts of operations do synonyms need to support?
> truncate?
> alter table?
> reindex?
>


I am no expert or anything but I would think they would be like
symlinks so yes to all of the above.