[HACKERS] why SPI_execute_with_args don't use known values for optimalisation

2008-05-22 Thread Pavel Stehule
Hello I would to use EXECUTE USING for optimalisation query SELECT * FROM tab WHERE column = param OR param IS NULL (if param isn't null then use param else ignore this params) Planner can do it: postgres=# explain select * from test where a = 100 or 100 is null;

Re: [HACKERS] proposal: table functions and plpgsql

2008-05-22 Thread Hannu Krosing
On Wed, 2008-05-21 at 23:06 +0200, Pavel Stehule wrote: 2008/5/21 Hannu Krosing [EMAIL PROTECTED]: On Wed, 2008-05-21 at 13:31 -0400, Merlin Moncure wrote: On Wed, May 21, 2008 at 1:28 PM, Hannu Krosing [EMAIL PROTECTED] wrote: In my proposal I don't create any default variables. Result

Re: [HACKERS] idea: storing view source in system catalogs

2008-05-22 Thread Tom Lane
Robert Haas [EMAIL PROTECTED] writes: I think the real problem here is that PostgreSQL is very finicky about what operations you can perform on a view. If I have a table foo and I define a view bar that uses foo and a view baz that uses bar, I can add a column to foo without a problem, and,

Re: [HACKERS] proposal: table functions and plpgsql

2008-05-22 Thread Pavel Stehule
2008/5/22 Hannu Krosing [EMAIL PROTECTED]: On Wed, 2008-05-21 at 23:06 +0200, Pavel Stehule wrote: 2008/5/21 Hannu Krosing [EMAIL PROTECTED]: On Wed, 2008-05-21 at 13:31 -0400, Merlin Moncure wrote: On Wed, May 21, 2008 at 1:28 PM, Hannu Krosing [EMAIL PROTECTED] wrote: In my proposal I

[HACKERS] Error while executing pg_dump invalid memory alloc request size 4294967293

2008-05-22 Thread Amit jain
Hello All, We are using postgresql version 8.1 and our database size is 7gb. Ram Size is 2 GB. while trying to take backup through pg_dump i am getting following error. oka97: pg_dump amtdb amtdb.out pg_dump: ERROR: invalid memory alloc request size 4294967293 pg_dump: SQL command to dump

Re: [HACKERS] pg_dump roles support

2008-05-22 Thread Stephen Frost
Greetings, * Stephen Frost ([EMAIL PROTECTED]) wrote: Discussing psql options made me recall an annoying problem that we've run into. There's no way (unless it was added to 8.3 and I missed it, but I don't think so) to tell pg_dump 'switch to this role before doing anything else'.

Re: [HACKERS] idea: storing view source in system catalogs

2008-05-22 Thread Gregory Stark
Tom Lane [EMAIL PROTECTED] writes: Robert Haas [EMAIL PROTECTED] writes: I think the real problem here is that PostgreSQL is very finicky about what operations you can perform on a view. If I have a table foo and I define a view bar that uses foo and a view baz that uses bar, I can add a

Re: [HACKERS] idea: storing view source in system catalogs

2008-05-22 Thread Tom Lane
Gregory Stark [EMAIL PROTECTED] writes: Tom Lane [EMAIL PROTECTED] writes: Yeah. The current restrictions were set when CREATE OR REPLACE VIEW was first implemented, and at that time we didn't have very much ALTER TABLE capability at all; the view restrictions mirror what we could do with a

Re: [HACKERS] [ADMIN] Error while executing pg_dump invalid memory alloc request size 4294967293

2008-05-22 Thread Vishal Mailinglist
Hi , Make sure no one is connected to the database while doing the back up. Usually memory alloc error comes if its a bad RAM . check the pg_dump version and your database version match (this could be a guess) try file level backup and restore into new database. On 22/05/2008, Amit jain [EMAIL