Re: [GENERAL] Array comparison - subset

2006-09-04 Thread Christopher Murtagh
On 9/3/06, Michael Fuhr <[EMAIL PROTECTED]> wrote: On Fri, Sep 01, 2006 at 11:55:32AM -0400, Christopher Murtagh wrote: > I've got a function that returns and array $foo, and an array $bar. > Is there an elegant way to test if $bar is a subset of $foo? I've been > loo

[GENERAL] Array comparison - subset

2006-09-01 Thread Christopher Murtagh
Greetings folks, I've got a function that returns and array $foo, and an array $bar. Is there an elegant way to test if $bar is a subset of $foo? I've been looking through the docs and haven't found anything. Am I missing something obvious, or am I out of luck? Cheers, Chris --

[GENERAL] SOLVED: Re: UTF-8 and stripping accents

2006-06-15 Thread Christopher Murtagh
Hey, I solved my own problem! I'm posting here because while I was looking for solutions, I found tons of folks tackling the same problem, most didn't find the solution or had to do cumbersome 'translate()'s to get what they wanted. The difference between my 7.4.6 and 8.1.4 DBs was that 7.4.6 had

[GENERAL] UTF-8 and stripping accents

2006-06-15 Thread Christopher Murtagh
Greetings folks, I'm trying to write a stored procedure that strips accents from UTF-8 encoded text. I saw a thread on this list discussing something very similar to this on April 8th, and used it to start. However, I'm getting odd behaviour. My stored procedure: CREATE OR REPLACE FUNCTION stri

Re: [GENERAL] plpgsql return setof integer?

2005-08-25 Thread Christopher Murtagh
On Wed, 24 Aug 2005, Alvaro Herrera wrote: On Wed, Nov 12, 2003 at 11:42:56PM -0500, Christopher Murtagh wrote: Thanks once again. You've really helped a lot on this. I especially liked your 'return qq/{"/ . (join qq/","/, @_) . qq/"}/;' code. If you were in

Re: [GENERAL] Trigger that spawns forked process

2005-05-11 Thread Christopher Murtagh
On Wed, 2005-05-11 at 00:08 +0200, Martijn van Oosterhout wrote: > On Tue, May 10, 2005 at 05:31:56PM -0400, Christopher Murtagh wrote: > > > I'm not sure what happens when you do "exit" here, but I'll lay odds > > > against it being exactly the right

Re: [GENERAL] Trigger that spawns forked process

2005-05-10 Thread Christopher Murtagh
On Tue, 2005-05-10 at 16:17 -0400, Tom Lane wrote: > ... let's see, you already broke the backend there --- unless its normal > setting of SIGCHLD is IGNORE, in which case munging it is unnecessary > anyway ... Here's my (probably all garbled) explanation: Essentially what that code is a self-daem

Re: [GENERAL] Trigger that spawns forked process

2005-05-10 Thread Christopher Murtagh
On Tue, 2005-05-10 at 13:50 -0700, David Fetter wrote: > Why do you think Slony won't work for this? One way it could do it is > to have an ON INSERT trigger that populates one or more tables with > the result of the XSLT, which table(s) Slony replicates to the other > servers. Because the nodes

Re: [GENERAL] Trigger that spawns forked process

2005-05-10 Thread Christopher Murtagh
replication of the cached file to the nodes (already written and tested). Why is a daemon more robust than this? (BTW, I ask out of ignorance, not out of arrogance). Cheers, Chris -- Christopher Murtagh Enterprise Systems Administrator ISR / Web Service Group McGill Univ

Re: [GENERAL] Trigger that spawns forked process

2005-05-09 Thread Christopher Murtagh
ow's that? If I can notify a daemon that the change is committed, then why couldn't I write a forking plperl function that executes when the transaction is done? How is one riskier than the other? Is there something obvious I'm missing here? Cheers, Chris -- Christopher Murtagh Enterp

Re: [GENERAL] Trigger that spawns forked process

2005-05-09 Thread Christopher Murtagh
write another application to do this. I don't see how a daemon would necessarily be more robust either. Cheers, Chris -- Christopher Murtagh Enterprise Systems Administrator ISR / Web Service Group McGill University Montreal, Quebec Canada Tel.: (514) 398-3122 Fax: (514) 398-2017

Re: [GENERAL] Trigger that spawns forked process

2005-05-09 Thread Christopher Murtagh
On Mon, 2005-05-09 at 15:38 -0400, Tom Lane wrote: > Christopher Murtagh <[EMAIL PROTECTED]> writes: > > I would like to write a trigger or function that spawns a forked > > process so that the transaction is considered 'complete' to the client, > > but cont

[GENERAL] Trigger that spawns forked process

2005-05-09 Thread Christopher Murtagh
y much the same question: http://archives.postgresql.org/pgsql-general/2002-12/msg01187.php Has anyone done anything like this? Cheers, Chris -- Christopher Murtagh Enterprise Systems Administrator ISR / Web Service Group McGill University Montreal, Quebec Canada Tel.: (514) 398-3122 Fax:

Re: [GENERAL] PostgreSQL Porting Project

2003-12-30 Thread Christopher Murtagh
I'm interested in helping out where I can. Let me know what you've got and I'll try to help. Cheers, Chris -- Christopher Murtagh Enterprise Systems Administrator ISR / Web Communications Group McGill University Montreal, Quebec Canada Tel.: (514) 398-3122 Fax: (514) 398-2017

Re: [GENERAL] Permissions issue?

2003-12-17 Thread Christopher Murtagh
On Wed, 2003-12-17 at 15:25, Tom Lane wrote: > Christopher Murtagh <[EMAIL PROTECTED]> writes: > > Am I missing something obvious? > > The permissions were granted to PUBLIC, not to newuser, and so the > REVOKE doesn't do anything. You'd need to revoke rights

Re: [GENERAL] Permissions issue?

2003-12-17 Thread Christopher Murtagh
On Wed, 2003-12-17 at 13:54, Stephan Szabo wrote: > I think you probably want to revoke create on the public schema. Create on > databases controls the creation of schemas. > From the grant page: Hrm, thanks for the reply. I tried that too. Here's what I got (below). Am I missing something obviou

Re: [GENERAL] Permissions issue?

2003-12-17 Thread Christopher Murtagh
On Wed, 2003-12-17 at 13:20, Christopher Murtagh wrote: > I'm trying to create a user without create privileges and I don't > seem to be able to do it. I could be clueless, but after my revoke > statements, the new user still seems to be able to create dbs, and > then have f

[GENERAL] restore error - language "plperlu" is not trusted

2003-12-16 Thread Christopher Murtagh
ROR: language "plperlu" is not trusted and it gave a line number, which contained the following: GRANT ALL ON LANGUAGE plperlu TO postgres WITH GRANT OPTION; Now, my plperlu functions seem to behaving as expected (they read from and write to /tmp). Should I be worried? Cheers, Chris --

Re: [GENERAL] Good open source mailing list system PHP / Postgresql

2003-12-03 Thread Christopher Murtagh
On Wed, 2003-12-03 at 11:08, Randal L. Schwartz wrote: > >>>>> "Christopher" == Christopher Murtagh <[EMAIL PROTECTED]> writes: > > Christopher> 3) Building templates with embedded code is much > Christopher> easier/more intuitive in PHP tha

[GENERAL] plpgsql return setof integer?

2003-11-12 Thread Christopher Murtagh
-- {HASH(0x835c298),2100,2113,2114} (1 row) Any obvious thing that I'm doing wrong? I'm using 7.4RC2. As always, any help or info would be much appreciated. Bonus points if someone knows what the HASH is. :-) Cheers, Chris -- Christopher Murtagh Enterprise Sys

Re: [GENERAL] plperl/createlang issue

2003-11-12 Thread Christopher Murtagh
On Tue, 2003-11-11 at 21:22, Ed L. wrote: > $ createlang plperl template1 > ERROR: Load of file /opt/pgsql/installs/postgresql-7.3.4/lib/plperl.so > failed: libperl.so: cannot open shared object file: No such file or > directory > createlang: language installation failed I had the exact proble

Re: [GENERAL] PL/Perl returning multiple rows

2003-11-11 Thread Christopher Murtagh
to the original problem (unless I'm missing something obvious). Cheers, Chris -- Christopher Murtagh Enterprise Systems Administrator ISR / Web Communications Group McGill University Montreal, Quebec Canada Tel.: (514) 398-3122 Fax: (514) 398-2017 ---(end o

Re: [GENERAL] PL/Perl returning multiple rows

2003-11-10 Thread Christopher Murtagh
stgres.org/docs/7.3/static/xfunc-c.html Can you recommend more reading on writing C functions for Postgres? Books, anything? Thanks again. Cheers, Chris -- Christopher Murtagh Enterprise Systems Administrator ISR / Web Communications Group McGill University Montreal, Quebec Canada Tel.: (514)

Re: [GENERAL] PL/Perl returning multiple rows

2003-11-10 Thread Christopher Murtagh
'd be happy for any more thoughts and ideas. Cheers, Chris -- Christopher Murtagh Enterprise Systems Administrator ISR / Web Communications Group McGill University Montreal, Quebec Canada Tel.: (514) 398-3122 Fax: (514) 398-2017 ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

[GENERAL] Two build problems - openssl and plperl on RedHat

2003-11-10 Thread Christopher Murtagh
ostgres won't be able to compile if it isn't a shared object. Since Postgres compiled, can I assume that the Perl install is ok? My machine is a P4 running RedHat 9.0. Any info would be greatly appreciated. Cheers, Chris -- Christopher Murtagh Enterprise Systems Administrator ISR

PHP db support was Re: [GENERAL] Dreamweaver

2003-09-17 Thread Christopher Murtagh
a bunch of PHP classes. More on dbx here: http://ca.php.net/manual/en/ref.dbx.php Cheers, Chris -- Christopher Murtagh Enterprise Systems Administrator ISR / Web Communications Group McGill University Montreal, Quebec Canada Tel.: (514) 398-3122 Fax: (514) 398-2017 --

Re: [GENERAL] Graphical Mapping a Database

2003-09-17 Thread Christopher Murtagh
/>. FWIW, we bought a site license for DBVis and it has been pretty great. It runs on my YellowDog Linux (PPC) and RedHat desktops as well as our MacOS X machines. Well worth the $$ IMO. Cheers, Chris -- Christopher Murtagh Enterprise Systems Administrator ISR / Web Communications Group McG

Re: [GENERAL] Changing DB ownership

2003-08-14 Thread Christopher Murtagh
I didn't rename any database, nor do anything 'radical'. Please re-read my message and you'll see. This SQL query: UPDATE pg_database SET datdba = 504 WHERE datname='chris'; is obviously simpler than a pg_dump, dropdb, createdb, pg_restore. Cheers, Chris

[GENERAL] Changing DB ownership

2003-07-30 Thread Christopher Murtagh
Dumb question maybe, but how does one change database ownership? I've tried several permutations of: ALTER DATABASE SET ("|'| )owner("|'| ) TO ("|'| )newowner("|'| ); and I tried looking at pg_database and I *was* able to hack this (got a clue half way through writing this email... sorry): UPDA