Re: [HACKERS] Patch: plan invalidation vs stored procedures

2008-08-06 Thread Tom Lane
Martin Pihlak <[EMAIL PROTECTED]> writes: > Changing statement result type is also currently prohibited in > StorePreparedStatement. There maybe good reasons for this, How about "the SQL spec says so"? Admittedly, it's a bit of a jump from views to prepared statements, but the spec is perfectly c

Re: [HACKERS] plan invalidation vs stored procedures

2008-08-06 Thread Merlin Moncure
On Wed, Aug 6, 2008 at 3:29 PM, Florian Pflug <[EMAIL PROTECTED]> wrote: > Merlin Moncure wrote: >> >> you missed the point...if your return type is a composite type that is >> backed by the table (CREATE TABLE, not CREATE TYPE), then you can >> 'alter' the type by altering the table. This can be

Re: [HACKERS] Proposal of SE-PostgreSQL patches [try#2]

2008-08-06 Thread KaiGai Kohei
On the WiKi of CommitFest:Sep, http://wiki.postgresql.org/wiki/CommitFest:2008-09 The entry of SE-PostgreSQL points a message when I submitted older version of our patch set. But the latest ones are listed on another message. Please add a link to the following message for our convenience: ht

Re: [HACKERS] plan invalidation vs stored procedures

2008-08-06 Thread Dimitri Fontaine
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, Le 6 août 08 à 20:42, Marko Kreen a écrit : But you missed my point: if you don't have functions backed by table, the DROP+CREATE results in inappropriate behaviour that can be avoided. Just wanted to say I agree with Marko here: it seems w

Re: [HACKERS] plan invalidation vs stored procedures

2008-08-06 Thread Marko Kreen
On 8/6/08, Florian Pflug <[EMAIL PROTECTED]> wrote: > Merlin Moncure wrote: > > you missed the point...if your return type is a composite type that is > > backed by the table (CREATE TABLE, not CREATE TYPE), then you can > > 'alter' the type by altering the table. This can be done without full > >

Re: [HACKERS] plan invalidation vs stored procedures

2008-08-06 Thread Florian Pflug
Merlin Moncure wrote: you missed the point...if your return type is a composite type that is backed by the table (CREATE TABLE, not CREATE TYPE), then you can 'alter' the type by altering the table. This can be done without full drop recreate of the function. Which - at least IMHO - clearly sh

[HACKERS] ambulkinsert

2008-08-06 Thread Steve Mitchell
Do we need a new API (ambulkinsert) to support optimized bulk insertion into indexes? Browsing the mailing lists I see people trying to improve bulk loading into indexes. One approach is to side-step WAL, but others have looked at alternative indexing methods. In my application, insertion speed

Re: [HACKERS] Status of DISTINCT-by-hashing work

2008-08-06 Thread Tom Lane
I wrote: > ... For INTERSECT/EXCEPT (with or without ALL), > you really need to maintain counters in each hashtable entry so you know > how many matching rows you got from each side of the set operation. > So it'd be necessary to either duplicate a large chunk of nodeAgg.c, or > make that code han

Re: [HACKERS] plan invalidation vs stored procedures

2008-08-06 Thread Marko Kreen
On 8/6/08, Merlin Moncure <[EMAIL PROTECTED]> wrote: > On Wed, Aug 6, 2008 at 2:28 PM, Marko Kreen <[EMAIL PROTECTED]> wrote: > > On 8/6/08, Merlin Moncure <[EMAIL PROTECTED]> wrote: > >> On Wed, Aug 6, 2008 at 2:20 AM, Marko Kreen <[EMAIL PROTECTED]> wrote: > >> > But the main problem is that

Re: [HACKERS] plan invalidation vs stored procedures

2008-08-06 Thread Asko Oja
Don't you think we try to be careful but still we manage to overlook several times in year something and cause some stupid downtime. On Wed, Aug 6, 2008 at 9:13 PM, Merlin Moncure <[EMAIL PROTECTED]> wrote: > On Wed, Aug 6, 2008 at 2:20 AM, Marko Kreen <[EMAIL PROTECTED]> wrote: > > But the main

Re: [HACKERS] plan invalidation vs stored procedures

2008-08-06 Thread Merlin Moncure
On Wed, Aug 6, 2008 at 2:28 PM, Marko Kreen <[EMAIL PROTECTED]> wrote: > On 8/6/08, Merlin Moncure <[EMAIL PROTECTED]> wrote: >> On Wed, Aug 6, 2008 at 2:20 AM, Marko Kreen <[EMAIL PROTECTED]> wrote: >> > But the main problem is that if the DROP/CREATE happens, the failure >> > mode is very nasty

Re: [HACKERS] plan invalidation vs stored procedures

2008-08-06 Thread Marko Kreen
On 8/6/08, Merlin Moncure <[EMAIL PROTECTED]> wrote: > On Wed, Aug 6, 2008 at 2:20 AM, Marko Kreen <[EMAIL PROTECTED]> wrote: > > But the main problem is that if the DROP/CREATE happens, the failure > > mode is very nasty - you get permanent error on existing backends. > > (Main case I'm talking

[HACKERS] Patch: plan invalidation vs stored procedures

2008-08-06 Thread Martin Pihlak
This is a followup for thread "plan invalidation vs stored procedures". The background is that it is impossible to change function return type without dropping and recreating. Unfortunately dropping a function ruins all of the prepared statements that reference that function (including other funct

Re: [HACKERS] plan invalidation vs stored procedures

2008-08-06 Thread Merlin Moncure
On Wed, Aug 6, 2008 at 2:20 AM, Marko Kreen <[EMAIL PROTECTED]> wrote: > But the main problem is that if the DROP/CREATE happens, the failure > mode is very nasty - you get permanent error on existing backends. > (Main case I'm talking about is functions calling other functions.) > > Some sorta rec

Re: [HACKERS] Parsing of pg_hba.conf and authenticationinconsistencies

2008-08-06 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > Am Tuesday, 5. August 2008 schrieb korry: >> Perhaps the --check-config option should take an (optional) file name? >> That would allow you to validate a config file without having to copy >> it into place first. >> >> postgres --check-config=myFilena

Re: [HACKERS] unable to build libpq on Win 2003 (32 bit)

2008-08-06 Thread Hiroshi Saito
Hi. Umm, It is very strange... I can't do a check in the reason for not having the environment of win2003 now. sorry... Can you the following try? nmake -f win32 /D CPU=i386 and, the output of the "set" command may be helpful. Regards, Hiroshi Saito - Original Message - From: "Ni

Re: [HACKERS] Automatic Client Failover

2008-08-06 Thread Markus Wanner
Hi, Dimitri Fontaine wrote: That's not exactly this, I want to preserve any of the database servers from erroring whenever a network failure happens. Sync is not an answer here. So, you want your base data to remain readable on the slaves, even if it looses connection to the master, right?

Re: [HACKERS] Parsing of pg_hba.conf and authenticationinconsistencies

2008-08-06 Thread Peter Eisentraut
Am Tuesday, 5. August 2008 schrieb korry: > Perhaps the --check-config option should take an (optional) file name? > That would allow you to validate a config file without having to copy > it into place first. > > postgres --check-config=myFilenameGoesHere -D $PGDATA There is already an elab

Re: [HACKERS] unable to build libpq on Win 2003 (32 bit)

2008-08-06 Thread Nikolae Shevchenco (md)
Hi Hiroshi, Thank you for your time. BTW I was trying to compile on different machine with Win XP and a build was successful. However I still have issues trying to compile on my machine with Win Server 2003 maybe the root cause is lying on that? I'm sending you output of the make command: C:\sr

Re: [HACKERS] unable to build libpq on Win 2003 (32 bit)

2008-08-06 Thread Hiroshi Saito
Hi Nikolae-san. I tried by 8.3.0 which you use again. and VC++2005. Then, It does not reproduce a problem. http://winpg.jp/~saito/pg_work/pg8.3.0_nmake_VC++2005.txt I want to see your compile message. It is that one does not output an object as a very strange thing.?_? Regards, Hiroshi Saito

Re: [HACKERS] 8.3 planner ignore index with text_pattern_ops for eq

2008-08-06 Thread Tom Lane
"Pavel Stehule" <[EMAIL PROTECTED]> writes: > there is some different behave between 8.3 and 8.1, 8.4 versions. 8.3 > can't share index for like and equ op. No, and neither could any other pre-8.4 version. http://archives.postgresql.org/pgsql-committers/2008-05/msg00346.php

[HACKERS] 8.3 planner ignore index with text_pattern_ops for eq

2008-08-06 Thread Pavel Stehule
Hello there is some different behave between 8.3 and 8.1, 8.4 versions. 8.3 can't share index for like and equ op. postgres=# select version(); version ---

Re: [HACKERS] Status of DISTINCT-by-hashing work

2008-08-06 Thread Tom Lane
"Hitoshi Harada" <[EMAIL PROTECTED]> writes: > Correct. I learned that method from nodeAgg. What I meant was that > window functions reach for plan node and its sort keys through > winstate->ss.ps. The mechanism is not ugly but some macros or exposed > API seem more comfortable, especially if think

Re: [HACKERS] Status of DISTINCT-by-hashing work

2008-08-06 Thread Hitoshi Harada
2008/8/6 Tom Lane <[EMAIL PROTECTED]>: > "Hitoshi Harada" <[EMAIL PROTECTED]> writes: >> In my patch nodeWindow.c, some functions reach for its parent state >> node to get info of sort keys by using fcinfo->context. This works but >> is completely ugly. > > Isn't that the same thing nodeAgg does: p

Re: [HACKERS] Automatic Client Failover

2008-08-06 Thread Dimitri Fontaine
Le mardi 05 août 2008, Markus Wanner a écrit : > I do not understanding that reasoning. Synchronous replication is > certainly *more* resilient to network failures, as it does *not* loose > any data on failover. > > However, you are speaking about "logs" and "stats". That certainly > sounds like da

Re: [HACKERS] plan invalidation vs stored procedures

2008-08-06 Thread Hannu Krosing
On Wed, 2008-08-06 at 15:41 +0200, Pavel Stehule wrote: > 2008/8/6 Hannu Krosing <[EMAIL PROTECTED]>: > > On Wed, 2008-08-06 at 12:13 +0200, Pavel Stehule wrote: > >> 2008/8/6 Hannu Krosing <[EMAIL PROTECTED]>: > >> > On Tue, 2008-08-05 at 16:17 +0200, Pavel Stehule wrote: > > .. > >> >> you cannot

Re: [HACKERS] Status of DISTINCT-by-hashing work

2008-08-06 Thread Tom Lane
"Hitoshi Harada" <[EMAIL PROTECTED]> writes: > In my patch nodeWindow.c, some functions reach for its parent state > node to get info of sort keys by using fcinfo->context. This works but > is completely ugly. Isn't that the same thing nodeAgg does: pass its AggState to aggregate functions? I don

Re: [HACKERS] plan invalidation vs stored procedures

2008-08-06 Thread Pavel Stehule
2008/8/6 Hannu Krosing <[EMAIL PROTECTED]>: > On Wed, 2008-08-06 at 12:13 +0200, Pavel Stehule wrote: >> 2008/8/6 Hannu Krosing <[EMAIL PROTECTED]>: >> > On Tue, 2008-08-05 at 16:17 +0200, Pavel Stehule wrote: > .. >> >> you cannot change header of function. It's same as change C header of >> >> fu

Re: [HACKERS] Status of DISTINCT-by-hashing work

2008-08-06 Thread Hans-Juergen Schoenig
Tom Lane wrote: I've pretty much finished the project I got a bee in my bonnet about last week, which is to teach SELECT DISTINCT how to (optionally) use hashing for grouping in the same way that GROUP BY has been able to do for awhile. There are still two places in the system that hard-wire the

Re: [HACKERS] pg_restore -d cipa /cipa/RAJASTHAN/RAJASTHAN/CIPABACKUP01_08_2008.TAR pg_restore: [archiver] out of memory

2008-08-06 Thread Andrew Dunstan
Amit jain wrote: Dear All, I am having a backup file in tar format. While restoring it through pg_restore instantly i am getting an following error. *Command - pg_restore -d cipa /cipa/RAJASTHAN/RAJASTHAN/CIPABACKUP01_08_2008.TAR Error - pg_restore: [archiver] out of memory *I have increa

[HACKERS] pg_restore -d cipa /cipa/RAJASTHAN/RAJASTHAN/CIPABACKUP01_08_2008.TAR pg_restore: [archiver] out of memory

2008-08-06 Thread Amit jain
Dear All, I am having a backup file in tar format. While restoring it through pg_restore instantly i am getting an following error. *Command - pg_restore -d cipa /cipa/RAJASTHAN/RAJASTHAN/CIPABACKUP01_08_2008.TAR Error - pg_restore: [archiver] out of memory *I have increased shmmax , maintenace

Re: [HACKERS] plan invalidation vs stored procedures

2008-08-06 Thread Hannu Krosing
On Wed, 2008-08-06 at 12:13 +0200, Pavel Stehule wrote: > 2008/8/6 Hannu Krosing <[EMAIL PROTECTED]>: > > On Tue, 2008-08-05 at 16:17 +0200, Pavel Stehule wrote: .. > >> you cannot change header of function. It's same as change C header of > >> function without complete recompilation. > > > > SQL i

Re: [HACKERS] unable to build libpq on Win 2003 (32 bit)

2008-08-06 Thread Nikolae Shevchenco (md)
Hi Hiroshi, Thanks for your reply. Sorry I may have missed something but I'm using Visual Studio 2005. Anyway I'm sending you the dir Release output: C:\src\PostgreSQL\postgresql-8.3.0\src\interfaces\libpq\Release>dir Volume in drive C has no label. Volume Serial Number is 40C0-3D67 Directory

Re: [HACKERS] Status of DISTINCT-by-hashing work

2008-08-06 Thread Hitoshi Harada
2008/8/6 Tom Lane <[EMAIL PROTECTED]>: > Gregory Stark <[EMAIL PROTECTED]> writes: >> "Tom Lane" <[EMAIL PROTECTED]> writes: >>> There are still two places in the system that hard-wire the use of >>> sorting for duplicate elimination: >>> >>> * Set operations (UNION/INTERSECT/EXCEPT) > >> Egads. Ar

Re: [HACKERS] plan invalidation vs stored procedures

2008-08-06 Thread Pavel Stehule
2008/8/6 Hannu Krosing <[EMAIL PROTECTED]>: > On Tue, 2008-08-05 at 16:17 +0200, Pavel Stehule wrote: >> 2008/8/5 Asko Oja <[EMAIL PROTECTED]>: >> > postgres=# create or replace function pavel ( i_param text, status OUT int, >> > status_text OUT text ) returns record as $$ select 200::int, 'ok'::te

Re: [HACKERS] plan invalidation vs stored procedures

2008-08-06 Thread Hannu Krosing
On Tue, 2008-08-05 at 16:17 +0200, Pavel Stehule wrote: > 2008/8/5 Asko Oja <[EMAIL PROTECTED]>: > > postgres=# create or replace function pavel ( i_param text, status OUT int, > > status_text OUT text ) returns record as $$ select 200::int, 'ok'::text; $$ > > language sql; > > CREATE FUNCTION > >

Re: [HACKERS] plan invalidation vs stored procedures

2008-08-06 Thread Hannu Krosing
On Tue, 2008-08-05 at 16:16 +0200, Pavel Stehule wrote: > 2008/8/5 Martin Pihlak <[EMAIL PROTECTED]>: > >>> DROP FUNCTION > >>> create function foo() returns integer as $$ begin return 2; end; $$ > >>> language plpgsql; > >>> CREATE FUNCTION > >>> execute c1; > >>> psql:test.sql:11: ERROR: cache