From: Richard Sydney-Smith <richard@ibisaustralia.com>
To: Mark Gibson <gibsonm@cromwell.co.uk>
To: pgsql-sql@postgresql.org
Subject: Re: Implementation of a bag pattern using rules
Date: Mon, 9 Feb 2004 22:54:33 +0800
Message-ID: <001b01c3ef1c$a3034890$cee98a90@athlon2000> (raw)
References: <40278022.5070408@cromwell.co.uk>
Mark,
love the idea, guess I should have read it somewhere but haven't. Obvious
and beautiful. Please let me know if you or someone else solves the initial
double value.
Got me thinking of all the places I cold have used this instead of coding
select/insert/update/delete.
Also have you worked a solutions where both the abs and relative inserts
apply to the same bag
eg insert another apple vs set apples to 5
Much of my attitude to triggers has been non-committal. Your example changes
that.
Well thanks again
Richard Sydney-Smith
----- Original Message -----
From: "Mark Gibson" <gibsonm@cromwell.co.uk>
To: <pgsql-sql@postgresql.org>
Sent: Monday, February 09, 2004 8:42 PM
Subject: [SQL] Implementation of a bag pattern using rules
> Hello,
> I've been playing around with a simple solution for a bag or sparse
> matrix using rules,
> but have encountered a few problems I wish to discuss.
> The bag pattern is commonly used for shopping baskets (item => quantity).
> This sollution can also be used for a sparse matrix too (row,col =>
value).
>
> Example:
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-sql@postgresql.org
Cc: richard@ibisaustralia.com, gibsonm@cromwell.co.uk
Subject: Re: Implementation of a bag pattern using rules
In-Reply-To: <001b01c3ef1c$a3034890$cee98a90@athlon2000>
* 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