From: Radu-Adrian Popescu <radu.popescu@aldratech.com>
To: pgsql-sql@postgresql.org
Subject: Re: insert rule doesn't see id field
Date: Fri, 10 Jan 2003 11:33:29 +0200
Message-ID: <003d01c2b88b$55682a10$0600a8c0@rpopescu> (raw)
References: <20030107145422.GE12245@mtholyoke.edu>
<13558.1041955268@sss.pgh.pa.us>
<20030108181303.GA23456@mtholyoke.edu>
<20030109191258.GA6739@mtholyoke.edu>
<003501c2b88a$ff38def0$0600a8c0@rpopescu>
I'm extremely sorry about the post in this thread ! Had a brain cramp, my
appologies. Should have been Re: [SQL] SQL function parse error.
Terribly sorry again !
=====
Radu-Adrian Popescu
CSA, DBA, Developer
Aldratech Ltd.
----- Original Message -----
From: "Radu-Adrian Popescu" <radu.popescu@aldratech.com>
To: "Ron Peterson" <rpeterso@mtholyoke.edu>; <pgsql-sql@postgresql.org>
Sent: Friday, January 10, 2003 11:31 AM
Subject: Re: [SQL] insert rule doesn't see id field
To everyone interested, check out Tom Lane's and Bruce's comments on
pgsql-hackers:
http://archives.postgresql.org/pgsql-hackers/2003-01/msg00446.php
There seems to be some consensus towards removing $ from the list of allowed
operator characters.
Regards,
=====
Radu-Adrian Popescu
CSA, DBA, Developer
Aldratech Ltd.
----- Original Message -----
From: "Ron Peterson" <rpeterso@mtholyoke.edu>
To: <pgsql-sql@postgresql.org>
Sent: Thursday, January 09, 2003 9:12 PM
Subject: Re: [SQL] insert rule doesn't see id field
On Wed, Jan 08, 2003 at 01:13:03PM -0500, Ron Peterson wrote:
> On Tue, Jan 07, 2003 at 11:01:08AM -0500, Tom Lane wrote:
>
> > > I thought that the idea behind noup was to protect single columns from
> > > update. However, when I apply the noup trigger as above, I can't
> > > update /any/ column. Is this the intended behaviour?
> >
> > Idly looking at the source code for contrib/noupdate/noup.c, I don't
> > believe that it has ever worked as advertised: it seems to reject any
> > non-null value for the target column, independently of whether the
> > value is the same as before (which is what I'd have thought it should
> > do).
> >
> > Is anyone interested in fixing it? Or should we just remove it?
> > If it's been there since 6.4 and you're the first person to try to use
> > it, as seems to be the case, then I'd have to say that it's a waste of
> > space in the distribution.
>
> I'm going to see if I can create this function.
Well, I think I've thunk something up. Of course I'm happy to submit
my modification for distribution or ridicule, as the case may be.
Where should I submit this?
I made a function noupcols() which takes one or more column names as
arguments. The function then creates a new tuple by getting the old
values for those columns, and then doing an SPI_modifytuple on the new
tuple using the old values for those columns.
I'm kind of flying by the seat of my pants here, so if anyone would
care to critically review my code, by all means...
--
Ron Peterson -o)
Network & Systems Manager /\\
Mount Holyoke College _\_v
http://www.mtholyoke.edu/~rpeterso ----
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/users-lounge/docs/faq.html
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
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: radu.popescu@aldratech.com
Subject: Re: insert rule doesn't see id field
In-Reply-To: <003d01c2b88b$55682a10$0600a8c0@rpopescu>
* 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