Re: [SQL] Aggregate Function with Argument

2004-10-19 Thread Mark Gibson
STRICT IMMUTABLE; Example: SELECT * FROM array_enum(string_to_array('one,two,three',',')); -- Mark Gibson Web Developer & Database Admin Cromwell Tools Ltd. Leicester, England. ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [SQL] problems using phpPgAmin

2004-10-19 Thread Mark Gibson
? Have you copied 'conf/config.inc.php-dist' to 'conf/config.inc.php' and configured it? BTW, there is a mailing list for phpPgAdmin at: [EMAIL PROTECTED] -- Mark Gibson Web Developer & Database Admin Cromwell Tools Ltd. Leicester, England.

Re: [SQL] Elegant way to monitor for changes in a trigger and migrate

2004-05-22 Thread Mark Gibson
rested. It needs some cleaning up first, when I have time. -- Mark Gibson Web Developer & Database Admin Cromwell Tools Ltd. Leicester, England. ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [SQL] [HACKERS] Materialized View Summary

2004-02-25 Thread Mark Gibson
he mutable bits! Giving you the best of both worlds. I haven't tried this or thought it through very much - too busy - but I'd thought I'd throw it in for a bit o' head scratching, and chin stroking :) Cheers -- Mark Gibson Web Developer & Database Admin Crom

[SQL] Tip: a function for creating a remote view using dblink

2004-02-16 Thread Mark Gibson
ames) || '' FROM '' || quote_ident(schema_name) || ''.'' || quote_ident(table_name)) || '') AS rel ('' || trim(trailing '','' from col_defs) || '')''; EXECUTE sql_str; RETURN; END '

Re: [SQL] Implementation of a bag pattern using rules

2004-02-09 Thread Mark Gibson
Tom Lane wrote: Mark Gibson <[EMAIL PROTECTED]> writes: CREATE RULE bag_rel AS ON INSERT TO bag_test WHERE EXISTS (SELECT 1 FROM bag_test WHERE item = NEW.item) DO INSTEAD UPDATE bag_test SET qty = qty + NEW.qty WHERE item = NEW.item; This can't work because a

Re: [SQL] Implementation of a bag pattern using rules

2004-02-09 Thread Mark Gibson
itself so we can create really simple clients easily in any language/environment. Right, I'm off home now :) Cheers -- Mark Gibson Web Developer & Database Admin Cromwell Tools Ltd. Leicester, England. ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings

Re: [SQL] Implementation of a bag pattern using rules

2004-02-09 Thread Mark Gibson
Robert Creager wrote: When grilled further on (Mon, 09 Feb 2004 12:42:10 +), Mark Gibson <[EMAIL PROTECTED]> confessed: CREATE RULE bag_abs AS ON INSERT TO bag_test WHERE EXISTS (SELECT 1 FROM bag_test WHERE item = NEW.item) DO INSTEAD UPDATE bag_test SET qty = N

[SQL] Implementation of a bag pattern using rules

2004-02-09 Thread Mark Gibson
+- (0 rows) Deleting works fine too. Does anyone know how to prevent the problem with the initial insert? I've read 'The Rule System' chapter several times, it's fairly heavy going, and results in much head scratching, but I still can't work out how to fix it. Any