FW: [SQL] Possible to emulate pre-8.2 behaviour of SET CONSTRAINTS?

2007-01-22 Thread Simon Kinsella
That sounds like a plan - will give it a go. Thanks! simon -Original Message- From: Tom Lane [mailto:[EMAIL PROTECTED] Sent: Monday, January 22, 2007 3:37 AM To: Simon Kinsella Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] Possible to emulate pre-8.2 behaviour of SET CONSTRAINTS

[SQL] Possible to emulate pre-8.2 behaviour of SET CONSTRAINTS?

2007-01-21 Thread Simon Kinsella
s, or some other technique? I'm relunctant to use SET CONSTRAINTS' 'ALL' clause in case it messes with other constraints in the system. Hope this makes sense, Simon --- Simon Kinsella Technical Director - Bluefire Systems Ltd This message has been scanned for viruses. --

[SQL] Help with distinctly non-intuitive rule behaviour

2006-03-05 Thread Simon Kinsella
n-key violation resulting from an unmolested DELETE action even for a user who has not been soft-deleted. If as a test I change the UPDATE action so that it does something other than change the timestamp then the rule is applied. This seems pretty weird - can it be true? --- Simon

Re: [SQL] Help with trigger that updates a row prior to a potentially aborted deletion?

2006-03-02 Thread Simon Kinsella
Sent: Thursday, March 02, 2006 12:20 PM To: pgsql-sql@postgresql.org Subject: Re: [SQL] Help with trigger that updates a row prior to a potentially aborted deletion? On Wed, Mar 01, 2006 at 08:41:20PM -, Simon Kinsella wrote: > Ok thanks, will check this out. Is that the same as savepoint

Re: [SQL] Help with trigger that updates a row prior to a potentially aborted deletion?

2006-03-01 Thread Simon Kinsella
a row prior to a potentially aborted deletion? On Wed, Mar 01, 2006 at 01:30:23PM -, Simon Kinsella wrote: > I'm trying to achieve this with a BEFORE DELETE trigger, which would > set the 'marked_for_deletion' field to TRUE before attempting the delete proper. > Then

Re: [SQL] Help with trigger that updates a row prior to a potentially aborted deletion?

2006-03-01 Thread Simon Kinsella
cular cascading contraint and replace it with a trigger function that calls my custom delete function. Not sure if I like that though ;) Thanks for your feedback, Simon Kinsella -Original Message- From: Stephan Szabo [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 01, 2006 2:31 PM To:

Re: [SQL] Help with trigger that updates a row prior to a potentially aborted deletion?

2006-03-01 Thread Simon Kinsella
hould remove the row completely. (Does not work OK) -------- Thanks all, Simon Kinsella ---(end of broadcast)--- TIP 6: explain analyze is your friend

[SQL] Help with trigger that updates a row prior to a potentially aborted deletion?

2006-03-01 Thread Simon Kinsella
getting anywhere! I have sample data defs to play with if that would be helpful. Thanks in advance! Simon Kinsella ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org

[SQL] PGSQL function for converting between arbitrary numeric bases?

2005-08-18 Thread Simon Kinsella
Hello, I'm looking - without luck so far - for a PGSQL function for converting numbers between two arbitrary bases (typically base 10,16 and 26 in my case). Something similar to the C 'strtol' function or, ideally, PHP's baseconvert(string,frombase,tobase) function. I've search the docs, lists a

[SQL] GROUPing only those rows that do not contain a NULL field?

2005-02-16 Thread Simon Kinsella
Hi I wonder if anyone can help me with a SELECT / GROUP BY problem I'm having. I'm trying to refine a query so that my GROUP BY clause only aggregates rows that have a non-NULL value in one of the fields, leaving other rows 'ungrouped'. An example table, resulting from a LEFT JOIN and subselect o