Re: [SQL] implementing (something like) UNIQUE constraint using PL/pgSQL

2007-01-27 Thread Michael Glaesemann
On Jan 27, 2007, at 16:55 , Bruno Wolff III wrote: On Fri, Jan 26, 2007 at 10:41:26 +0100, Tomas Vondra <[EMAIL PROTECTED]> wrote: in our application we need to implement a constraint that enforces 'at most N rows with this value', that is we have a table with 'flag' column and for eac

Re: [SQL] implementing (something like) UNIQUE constraint using PL/pgSQL

2007-01-26 Thread Bruno Wolff III
On Fri, Jan 26, 2007 at 10:41:26 +0100, Tomas Vondra <[EMAIL PROTECTED]> wrote: > > in our application we need to implement a constraint that enforces 'at > most N rows with this value', that is we have a table with 'flag' column > and for each value there should be at most 10 rows (for exampl