Re: [GENERAL] Rules going away

2011-09-30 Thread Gregg Jaskiewicz
You're right, rules are perfect for very limited and narrow cases. And make it very hard to write complicated queries against. (i.e., updates that only touch few columns, likewise with inserts). I'm guessing the upside is that rules are faster then triggers. -- Sent via pgsql-general mailing list

Re: [GENERAL] Rules going away

2011-09-30 Thread Igor Neyman
> -Original Message- > From: Gregg Jaskiewicz [mailto:gryz...@gmail.com] > Sent: Friday, September 30, 2011 5:18 AM > To: Igor Neyman > Cc: Ondrej Ivanič; pgsql-general@postgresql.org > Subject: Re: [GENERAL] Rules going away > > speaking of DO INSTEAD, for inser

Re: [GENERAL] Rules going away

2011-09-30 Thread Gregg Jaskiewicz
speaking of DO INSTEAD, for insert/update case. Try using RETURNING with that and rules ;) Good luck -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Rules going away

2011-09-29 Thread Igor Neyman
> -Original Message- > From: Ondrej Ivanič [mailto:ondrej.iva...@gmail.com] > Sent: Wednesday, September 28, 2011 6:47 PM > To: pgsql-general@postgresql.org > Subject: Re: Rules going away > > Hi, > > > folks, don't use RULES! use triggers -- and as much as possible, keep > > triggers sim

Re: [GENERAL] Rules going away

2011-09-28 Thread Ondrej Ivanič
Hi, > folks, don't use RULES! use triggers -- and as much as possible, keep > triggers simple, short, and to the point (simple validation, custom > RI, auditing/logging, etc). I like them :). 'DO INSTEAD' rules are great for partitioning so you can insert (or update) to parent table and 'DO INSTE

Re: [GENERAL] Rules going away

2011-09-28 Thread Merlin Moncure
On Wed, Sep 28, 2011 at 10:53 AM, Rob Sargent wrote: > > > On 09/28/2011 08:34 AM, Tom Lane wrote: >> Andrew Sullivan writes: >>> On Wed, Sep 28, 2011 at 06:20:04AM -0700, David Fetter wrote: There's an even better reason not to use rules: they're going away in a not too distant version

Re: [GENERAL] Rules going away

2011-09-28 Thread Rob Sargent
On 09/28/2011 08:34 AM, Tom Lane wrote: > Andrew Sullivan writes: >> On Wed, Sep 28, 2011 at 06:20:04AM -0700, David Fetter wrote: >>> There's an even better reason not to use rules: they're going away in >>> a not too distant version of PostgreSQL. >> Really? How? I thought views were done us