Re: [PATCHES] Updatable views

2008-05-08 Thread Simon Riggs
On Thu, 2008-05-08 at 21:37 +0200, Bernd Helmle wrote: > --On Donnerstag, Mai 08, 2008 16:34:39 +0100 Simon Riggs > <[EMAIL PROTECTED]> wrote: > > > Are you planning to work on this? > > > Yes, i do. But i have to finish other things first until i can get back > full attention to it, hopefull

Re: [PATCHES] Updatable views

2008-05-08 Thread Bernd Helmle
--On Donnerstag, Mai 08, 2008 16:34:39 +0100 Simon Riggs <[EMAIL PROTECTED]> wrote: Are you planning to work on this? Yes, i do. But i have to finish other things first until i can get back full attention to it, hopefully very soon. -- Sent via pgsql-patches mailing list (pgsql-patches@p

Re: [PATCHES] Updatable views

2008-05-08 Thread Simon Riggs
On Thu, 2008-05-08 at 17:20 +0200, Bernd Helmle wrote: > --On Donnerstag, Mai 08, 2008 14:42:50 +0100 Simon Riggs > <[EMAIL PROTECTED]> wrote: > > > That makes sense. I can't see how we would make LOCAL CHECK CONSTRAINTs > > work with rules anyhow. > > One of the idea's that came up through the

Re: [PATCHES] Updatable views

2008-05-08 Thread Bernd Helmle
--On Donnerstag, Mai 08, 2008 14:42:50 +0100 Simon Riggs <[EMAIL PROTECTED]> wrote: That makes sense. I can't see how we would make LOCAL CHECK CONSTRAINTs work with rules anyhow. One of the idea's that came up through the discussion was to make the rewriter responsible for collecting check

Re: [PATCHES] Updatable views

2008-05-08 Thread Simon Riggs
On Thu, 2008-05-08 at 14:56 +0200, Peter Eisentraut wrote: > Am Donnerstag, 8. Mai 2008 schrieb Simon Riggs: > > CREATE RULE somename AS ON INSERT TO x WHERE where-clause DO INSERT ... > > > > which seems straightforward, no? > > Double evaluation is the key word. The conclusion was more or less

Re: [PATCHES] Updatable views

2008-05-08 Thread Bernd Helmle
--On Donnerstag, Mai 08, 2008 13:28:14 +0100 Simon Riggs <[EMAIL PROTECTED]> wrote: On Thu, 2008-05-08 at 13:48 +0200, Bernd Helmle wrote: --On Mittwoch, Mai 07, 2008 20:38:59 +0100 Simon Riggs <[EMAIL PROTECTED]> wrote: >> Where are we on this feature? > > Any update, Bernd? I've merged the

Re: [PATCHES] Updatable views

2008-05-08 Thread Peter Eisentraut
Am Donnerstag, 8. Mai 2008 schrieb Simon Riggs: >  CREATE RULE somename AS ON INSERT TO x WHERE where-clause DO INSERT ... > > which seems straightforward, no? Double evaluation is the key word. The conclusion was more or less that you can't implement check constraints using the rules system. Y

Re: [PATCHES] Updatable views

2008-05-08 Thread Simon Riggs
On Thu, 2008-05-08 at 13:48 +0200, Bernd Helmle wrote: > --On Mittwoch, Mai 07, 2008 20:38:59 +0100 Simon Riggs > <[EMAIL PROTECTED]> wrote: > > >> Where are we on this feature? > > > > Any update, Bernd? > > I've merged the patch into current -HEAD and updated some parts. My current > *working

Re: [PATCHES] Updatable views

2008-05-08 Thread Bernd Helmle
--On Mittwoch, Mai 07, 2008 20:38:59 +0100 Simon Riggs <[EMAIL PROTECTED]> wrote: Where are we on this feature? Any update, Bernd? I've merged the patch into current -HEAD and updated some parts. My current *working* state can be reviewed at

Re: [PATCHES] Updatable views

2008-05-07 Thread Simon Riggs
On Thu, 2007-02-08 at 18:21 -0500, Bruce Momjian wrote: > Where are we on this feature? Any update, Bernd? -- Simon Riggs 2ndQuadrant http://www.2ndQuadrant.com -- Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org) To make changes to your subscription: http://www.postgre

Re: [PATCHES] Updatable views

2007-02-08 Thread Bruce Momjian
Where are we on this feature? --- Bernd Helmle wrote: > --On Mittwoch, August 30, 2006 12:01:25 -0400 Tom Lane <[EMAIL PROTECTED]> > wrote: > > > Bernd Helmle <[EMAIL PROTECTED]> writes: > >> [ latest views patch ] > > > >

Re: [HACKERS] [PATCHES] Updatable views

2006-08-31 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > Am Donnerstag, 31. August 2006 15:55 schrieb Tom Lane: >> The proposed WITH CHECK OPTION implementation is unworkable for exactly >> this reason --- it will give the wrong answers in the presence of >> volatile functions such as nextval(). > I'm not s

Re: [HACKERS] [PATCHES] Updatable views

2006-08-31 Thread Peter Eisentraut
Am Donnerstag, 31. August 2006 15:55 schrieb Tom Lane: > >> I'm unclear as to why you've got DO INSTEAD NOTHING rules in there --- > > > > You need to have one unconditional rule if you have a bunch of > > conditional ones. The system does not see through the fact that the > > conditional ones cov

Re: [HACKERS] [PATCHES] Updatable views

2006-08-31 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > Am Mittwoch, 30. August 2006 18:01 schrieb Tom Lane: >> This is the first time I've actually looked at this patch, and I am >> dismayed. viewUpdate.c looks like nothing so much as a large program >> with a small program struggling to get out. > But l

Re: [PATCHES] Updatable views

2006-08-31 Thread Bernd Helmle
--On Mittwoch, August 30, 2006 12:01:25 -0400 Tom Lane <[EMAIL PROTECTED]> wrote: Bernd Helmle <[EMAIL PROTECTED]> writes: [ latest views patch ] This is the first time I've actually looked at this patch, and I am dismayed. viewUpdate.c looks like nothing so much as a large program with a s

Re: [HACKERS] [PATCHES] Updatable views

2006-08-31 Thread Peter Eisentraut
Am Mittwoch, 30. August 2006 18:01 schrieb Tom Lane: > This is the first time I've actually looked at this patch, and I am > dismayed. viewUpdate.c looks like nothing so much as a large program > with a small program struggling to get out. What is all the stuff about > handling multiple base rels

Re: [HACKERS] [PATCHES] Updatable views

2006-08-30 Thread Jim C. Nasby
On Wed, Aug 30, 2006 at 12:01:25PM -0400, Tom Lane wrote: > Bernd Helmle <[EMAIL PROTECTED]> writes: > > [ latest views patch ] > > This is the first time I've actually looked at this patch, and I am > dismayed. viewUpdate.c looks like nothing so much as a large program > with a small program str

Re: [PATCHES] Updatable views

2006-08-30 Thread Tom Lane
Bernd Helmle <[EMAIL PROTECTED]> writes: > [ latest views patch ] This is the first time I've actually looked at this patch, and I am dismayed. viewUpdate.c looks like nothing so much as a large program with a small program struggling to get out. What is all the stuff about handling multiple bas

Re: [PATCHES] Updatable views

2006-08-29 Thread Alvaro Herrera
Bernd Helmle wrote: > --On Donnerstag, August 24, 2006 22:25:46 +0200 Bernd Helmle > <[EMAIL PROTECTED]> wrote: > > >--On Montag, August 21, 2006 02:07:41 -0400 Alvaro Herrera > ><[EMAIL PROTECTED]> wrote: > > > > > >If someone wants to look at the current updatable view patch, please look > >at

Re: [PATCHES] Updatable views

2006-08-26 Thread [EMAIL PROTECTED]
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Date: 25.08.2006 00:50:59 Subject: Re: [PATCHES] Updatable views > > Minor suggestion: change get_view_qualification_function to look the > function by Oid rather than name.  I wasn't sure it was actually

Re: [HACKERS] [PATCHES] Updatable views

2006-08-24 Thread Bernd Helmle
--On Donnerstag, August 24, 2006 11:02:43 -0500 Jaime Casanova <[EMAIL PROTECTED]> wrote: Actually the code delete implicit rules based on a field added to pg_rewrite but that catalog has a unique index on ev_class, rulename: "pg_rewrite_rel_rulename_index" UNIQUE, btree (ev_class, rulename) i

Re: [HACKERS] [PATCHES] Updatable views

2006-08-24 Thread Bernd Helmle
--On Donnerstag, August 24, 2006 11:00:45 -0400 Tom Lane <[EMAIL PROTECTED]> wrote: If the code is dependent on recognizing names to know what it's doing, then I'd say you have a fundamentally broken approach. Consider adding a flag column to pg_rewrite to distinguish these rules, instead. T

Re: [PATCHES] Updatable views

2006-08-24 Thread Jaime Casanova
On 8/24/06, Tom Lane <[EMAIL PROTECTED]> wrote: Bernd Helmle <[EMAIL PROTECTED]> writes: > While working on Alvaro's suggestions to fix the code i got the opinion > that we need to reject any attempts to name a user defined rule > as > "_INSERT" > "_NOTHING_INSERT" > "_DELETE" > "_NOTHING_DELETE

Re: [PATCHES] Updatable views

2006-08-24 Thread Tom Lane
Bernd Helmle <[EMAIL PROTECTED]> writes: > While working on Alvaro's suggestions to fix the code i got the opinion > that we need to reject any attempts to name a user defined rule > as > "_INSERT" > "_NOTHING_INSERT" > "_DELETE" > "_NOTHING_DELETE" > "_UPDATE" > "_NOTHING_UPDATE" If the code is

Re: [PATCHES] Updatable views

2006-08-24 Thread Bernd Helmle
--On Montag, August 21, 2006 02:07:41 -0400 Alvaro Herrera <[EMAIL PROTECTED]> wrote: So, I'll appreciate if somebody else takes the responsability to fix the remaining issues. I've put a lot of XXX's and some FIXME's. Some functions are in need of some comments as well. While working on Al

Re: [PATCHES] Updatable views

2006-08-21 Thread Alvaro Herrera
Bernd Helmle wrote: > >Comments from Bernd and Jaime are especially welcome if I've broken > >something that used to work on their patch :-) > > I see that the current patch doesn't support subqueries in the WHERE-clause > anymore. > You can find one example in the attached SQL-script. Is there

Re: [PATCHES] Updatable views

2006-08-21 Thread Alvaro Herrera
Bernd Helmle wrote: > I'll try to complete the missing comments and to make some statements > cleaner. Thanks. > --On Montag, August 21, 2006 02:07:41 -0400 Alvaro Herrera > <[EMAIL PROTECTED]> wrote: > >The new files are src/backend/rewrite/viewUpdate.c and > >src/include/rewrite/viewUpdate.h

Re: [PATCHES] Updatable views

2006-08-21 Thread Bernd Helmle
--On Montag, August 21, 2006 02:07:41 -0400 Alvaro Herrera <[EMAIL PROTECTED]> wrote: Hi, This is the patch for updatable views I've been able to come up with. A nasty bug was just discovered in the upcoming Mammoth Replicator release so I'm not sure if I'm going to have time to work more