pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Vik Fearing <vik@postgresfriends.org>
To: stan <stanb@panix.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Calling a function from a rule?
Date: Wed, 4 Mar 2020 15:04:34 +0100
Message-ID: <0a22aafe-9a3a-78b5-84e3-88c98512cba9@postgresfriends.org> (raw)
In-Reply-To: <20200304130506.GA10957@panix.com>
References: <20200304130506.GA10957@panix.com>

On 04/03/2020 14:05, stan wrote:
> I am missing something about how to properly create a rule.

What you are missing is that you should not ever use RULEs.

> Thanks to the helpful folks on this list, I am looking a creating some
> update able views. So, looks like I need to create a rule and a function
> for this.

Use an INSTEAD OF trigger on the view unless it's a simple view in which
case it "just works".
-- 
Vik Fearing





view thread (4+ messages)  latest in thread

Message-ID: <0a22aafe-9a3a-78b5-84e3-88c98512cba9@postgresfriends.org>
Permalink:  ../0a22aafe-9a3a-78b5-84e3-88c98512cba9@postgresfriends.org/
Also on:    postgresql.org/message-id/0a22aafe-9a3a-78b5-84e3-88c98512cba9@postgresfriends.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: vik@postgresfriends.org, stanb@panix.com
  Subject: Re: Calling a function from a rule?
  In-Reply-To: <0a22aafe-9a3a-78b5-84e3-88c98512cba9@postgresfriends.org>
  References: <20200304130506.GA10957@panix.com> <0a22aafe-9a3a-78b5-84e3-88c98512cba9@postgresfriends.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox