pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Vic <vic@dcc.dp.ua>
To: lockhart@alumni.caltech.edu
Cc: JanWieck@yahoo.com
Cc: pgsql-interfaces@postgresql.org
Cc: pgsql-hackers@postgresql.org
Subject: Simple question about Postgress rule system and docs for  it .
Date: Thu, 26 Oct 2000 21:46:07 +0300
Message-ID: <39F87BEF.FA8C05D8@dcc.dp.ua> (raw)

 Hello! 


   Its, may be ,little "gluk" in  doc, - sources and docs and examples
for Create Rule not correlated.
  Conctrento :))  ->
        В доке ->
 CREATE RULE example_1 AS
  ON UPDATE  emp.salary WHERE old.name = "Joe"
       /*  ^^^ */
     DO 
         UPDATE emp 
         SET salary = new.salary
         WHERE emp.name = "Sam";

 /* ^^^ - its maby  type-bUg -> ON UPDATE TO )*/
And  in sources........
       /* ----------
        * The current rewrite handler is known to work on relation level
        * rules only. And for SELECT events, it expects one non-nothing
        * action that is instead and returns exactly a tuple of the
        * rewritten relation. This restricts SELECT rules to views.
        *
        *         Jan
        * ----------
        */
       if (event_obj->attrs)
               elog(ERROR, "attribute level rules currently not
supported");
 In result on  all query, where after  "ON"   we put  something as
"emp.salary" ,
 Postgres answer :ERROR: "attribute level rules currently not supported"
  But in docs  
 CREATE RULE name AS ON event
     TO object [ WHERE condition ]
     DO [ INSTEAD ] [ action | NOTHING ]
 .....
 .....
where --> 
 object
  Object is either table or table.column. 
                            ^^^^^^^^^^^^^!!!!!  8-()
 И необходимость  в таких  правилах есть.
 In  baglist-е (todo) i dont found anything  about  this trouble.
 This code,doc don't rewriten from   version 6.4 - 
    i  diggin in several  Suse Linux - distrib,sourses
    dowloaded  from www.postgressql.org , and again  see all aviable
docs about rules.

Waiting for any  help.... ;) 

  Sorry ,pls for my dirty  english.....  
 Vic



Message-ID: <39F87BEF.FA8C05D8@dcc.dp.ua>
Permalink:  ../39F87BEF.FA8C05D8@dcc.dp.ua/
Also on:    postgresql.org/message-id/39F87BEF.FA8C05D8@dcc.dp.ua

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: vic@dcc.dp.ua, lockhart@alumni.caltech.edu, JanWieck@yahoo.com, pgsql-hackers@postgresql.org
  Subject: Re: Simple question about Postgress rule system and docs for  it .
  In-Reply-To: <39F87BEF.FA8C05D8@dcc.dp.ua>

* 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