AW: Problems with RULE - Mailing list pgsql-sql

From Jens Hartwig
Subject AW: Problems with RULE
Date
Msg-id 001001c0a728$1cedf0a0$c10ac98a@0000864A433A
Whole thread Raw
In response to Re: Problems with RULE  ("Richard Huxton" <dev@archonet.com>)
List pgsql-sql
> [...]
> So - if you issue "DELETE FROM t_xyz" you'd want two things to happen:
>
> 1. where deleted is false set it to true
> 2. where deleted was true delete the record
>
> So - PG rewrites the query into two parts:
>
> DELETE FROM t_xyz WHERE old.deleted=false
> DELETE FROM t_xyz WHERE NOT(old.deleted=false)
> [...]

Oooooh ... that's it! I hit my head against the wall :-)

Thank you very much!

Best regards, Jens Hartwig

-----------------------------------------------------

T-Systems
Projektleiter
debis Systemhaus GEI GmbH
Hausanschrift: Eichhornstraße 3, 10785 Berlin
Postanschrift: 10785 Berlin
Telefon: (004930) 25 54-32 82
Telefax: (004930) 25 54-31 87
Mobiltelefon: (0170) 167 26 48
E-Mail: jens.hartwig@t-systems.de
Internet: http://www.t-systems.de




pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: [DOCS] Extending PostgreSQL Using C
Next
From: Jie Liang
Date:
Subject: how to get info of function