Re: [GENERAL] Invalid redo in checkpoint record

2009-11-27 Thread Shakil Shaikh
From: "Craig Ringer" Before you do re-create the cluster, if the data is unimportant is there any chance you could take a copy of it so it can be examined to see what happened? PostgreSQL should recover cleanly after a hard crash, and unless there's a storage subsystem issue or fsync was off th

Re: [GENERAL] Create language PLPERL error

2009-09-05 Thread Shakil Shaikh
-- From: "Alvaro Herrera" Shakil Shaikh wrote: ERROR: could not access file "$libdir/plperl": No such file or directory Apparently this means that the version of Postgresql I have wasn't compiled with support for

Re: [GENERAL] Create language PLPERL error

2009-09-04 Thread Shakil Shaikh
From: "Alvaro Herrera" Remove that, and install them from Martin Pitt's repository: https://launchpad.net/~pitti/+archive/postgresql The one-click installer does not integrate well with the platform. Avoid using them. Hi, thanks for the tip. I tried installing this but am now getting the fo

Re: [GENERAL] Create language PLPERL error

2009-09-03 Thread Shakil Shaikh
From: "Tom Lane" You've apparently got a version of libperl.so that is not compatible with the one that your Postgres was built against. There are lots of compile-time options for Perl that affect this, so it's not exactly a surprising situation. The easiest fix is to be sure you get your pos

[GENERAL] Create language PLPERL error

2009-09-03 Thread Shakil Shaikh
Hi all, Running Postgres 8.4 on Ubuntu 9.04, installed via the clickonce installer. I'm getting a curious error when trying to create/add support for plperl to any database: ERROR: could not load library "/opt/PostgreSQL/8.4/lib/postgresql/plperl.so": /opt/PostgreSQL/8.4/lib/postgresql/plp

Re: [GENERAL] Array Parameters in EXECUTE

2009-06-11 Thread Shakil Shaikh
Re added list! -- Sent: Thursday, June 11, 2009 11:04 AM To: "Shakil Shaikh" <> Subject: Re: [GENERAL] Array Parameters in EXECUTE Here's my general situation: I have a function which takes in an optional ARRAY of Ids as so:

[GENERAL] Array Parameters in EXECUTE

2009-06-11 Thread Shakil Shaikh
Hi, Here's my general situation: I have a function which takes in an optional ARRAY of Ids as so: RETURN QUERY SELECT * FROM a WHERE a.id = ANY(v_ids) or v_ids is null; However it seems that the ...or v_ids is null... bit forces a sequential scan on a. Reading this list, it seems the best wa

Re: [GENERAL] Using ANY()

2009-06-08 Thread Shakil Shaikh
-- From: "Jeff Davis" On Sun, 2009-06-07 at 19:33 +0100, Shakil Shaikh wrote: A less trivial usage of the above would be to pass an array to a simple function using it to return a range of arbitrary rows. I don't know exactly w

[GENERAL] Using ANY()

2009-06-07 Thread Shakil Shaikh
Hi all, Is it appropriate to use ANY() in a select statement as so? SELECT * FROM table t WHERE t.id = ANY(ARRAY[1,2,3]); A less trivial usage of the above would be to pass an array to a simple function using it to return a range of arbitrary rows. The alternative to this would be to (program

Re: [GENERAL] Locking to restrict rowcounts.

2009-05-19 Thread Shakil Shaikh
-- From: "Richard Huxton" Of course, if you're going to have a separate table then you might as well store the count in there and actually update it on every insert/update/delete. Assuming you might find the count of some use somewhere. Set the

[GENERAL] Locking to restrict rowcounts.

2009-05-19 Thread Shakil Shaikh
Hi, Consider the following scenario: CREATE FUNCTION test(name) select into cnt count(id) from items where owner = name; --suppose someone inserts during this point? then next check will succeed when it should not. if (cnt < 10) then insert into items values ('new item', name); end; end; W