From: | Jan Wieck <janwieck(at)yahoo(dot)com> |
---|---|
To: | Fritz Lehmann-Grube <lehmannf(at)math(dot)TU-Berlin(dot)DE> |
Cc: | pgsql-sql <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: ERROR (Bug?) in RULE processing ? |
Date: | 2002-01-23 16:06:09 |
Message-ID: | 200201231606.g0NG69n14924@saturn.janwieck.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Fritz Lehmann-Grube wrote:
>
> Can somebody tell what this errormessage means ?
> ERROR: fireRIRrules: failed to remove aggs from qual
>
> I don't know what "aggs" and "qual" is.
The rewrite rule system was not able to combine the given
rule into your insert statement, because aggregate clauses
(count() here) in the qualification (WHERE ...) are in fact
impossible.
Your best bet it to implement that with a trigger.
Jan
>
> What I did:
> arbeitsdb=# select id,type,subtype,name from documents;
> id | type | subtype | name
> ----+------+---------+---------------
> 1 | 1 | 5 | motiv_el_01
> 2 | 1 | 1 | def_el_01
> 3 | 2 | 10 | deduc_el_01
> 4 | 2 | 18 | example_el_01
> (4 rows)
>
> arbeitsdb=# insert into documents(type,subtype,name)
> arbeitsdb-# values (2,16,'foo');
> INSERT 55505 1
> arbeitsdb=# delete from documents where oid=55505;
> DELETE 1
> arbeitsdb=# CREATE RULE doc_contained AS ON INSERT TO documents WHERE
> arbeitsdb-# ((NEW.type = 1) AND (count( (SELECT element_id
> arbeitsdb(# FROM element_contained_in WHERE (element_id =
> currval('docs_seq')) )) = 0))
> arbeitsdb-# DO INSTEAD NOTHING;
> CREATE
> arbeitsdb=# insert into documents(type,subtype,name)
> arbeitsdb-# values (2,16,'foo');
> ERROR: fireRIRrules: failed to remove aggs from qual
>
> Thanks Fritz
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck(at)Yahoo(dot)com #
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2002-01-23 16:08:36 | Re: pltcl build problem on FreeBSD (was: Re: pltlc and pltlcu problems) |
Previous Message | Tom Lane | 2002-01-23 16:00:28 | Re: ERROR (Bug?) in RULE processing ? |