Re: Implementation of a bag pattern using rules

Поиск
Список
Период
Сортировка
От Richard Sydney-Smith
Тема Re: Implementation of a bag pattern using rules
Дата
Msg-id 001b01c3ef1c$a3034890$cee98a90@athlon2000
обсуждение исходный текст
Ответ на Implementation of a bag pattern using rules  (Mark Gibson <gibsonm@cromwell.co.uk>)
Ответы Re: Implementation of a bag pattern using rules  (Mark Gibson <gibsonm@cromwell.co.uk>)
Список pgsql-sql
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:



В списке pgsql-sql по дате отправления:

Предыдущее
От: Paul Thomas
Дата:
Сообщение: Re: Index not used - now me
Следующее
От: Christoph Haller
Дата:
Сообщение: Re: Index not used - now me