[PATCHES] WIP: executor_hook for pg_stat_statements

2008-06-23 Thread ITAGAKI Takahiro
I'm working on light-weight SQL logging for PostgreSQL. http://archives.postgresql.org/pgsql-hackers/2008-06/msg00601.php I divide the SQL logging feature into a core patch and an extension module. I hope only the patch is to be applied in the core. The extension module would be better to be

Re: [PATCHES] variadic function support

2008-06-23 Thread Andrew Dunstan
Pavel Stehule wrote: Hello this patch enhance current syntax of CREATE FUNCTION statement. It allows creating functions with variable number of arguments. This version is different than last my patches. It doesn't need patching PL. Basic idea is transformation of real arguments (related to

Re: [PATCHES] variadic function support

2008-06-23 Thread Tom Lane
Andrew Dunstan [EMAIL PROTECTED] writes: This proposal strikes me as half-baked. Either we need proper and full support for variadic functions, or we don't, but I don't think we need syntactic sugar like the above (or maybe in this case it's really syntactic saccharine). What would you

Re: [PATCHES] A GUC variable to replace PGBE_ACTIVITY_SIZE

2008-06-23 Thread Neil Conway
On Mon, 2008-06-23 at 03:52 +1000, Thomas Lee wrote: * Should it be possible to set this new variable via a command-line option ala shared_buffers? I would say not: most parameters cannot be set by special command-line parameters, and this one is not important enough to warrant special

Re: [PATCHES] Simplify formatting.c

2008-06-23 Thread Bruce Momjian
Bruce Momjian wrote: I am starting to think that the simplest case is to keep the single-copy version in there for single-byte encodings and not worry about the overhead of the multi-byte case. My new idea is if we pass the length to str_initcap, we can eliminate the string copy from

Re: [PATCHES] Simplify formatting.c

2008-06-23 Thread Bruce Momjian
Euler Taveira de Oliveira wrote: Tom Lane wrote: Also, it seems a bit inconsistent to be relying on oracle_compat.c for upper/lower but not initcap. I saw this inconsistence while I'm doing the patch. What about moving that upper/lower/initcap and wcs* code to another file.

Re: [PATCHES] [HACKERS] Patch for Prevent pg_dump/pg_restore from being affected by statement_timeout

2008-06-23 Thread Bruce Momjian
Alex Hunsaker wrote: On Wed, Apr 16, 2008 at 4:54 PM, Alvaro Herrera [EMAIL PROTECTED] wrote: Joshua D. Drake escribi?: That is an interesting idea. Something like: pg_restore -E SET STATEMENT_TIMEOUT=0; SET MAINTENANCE_WORK_MEM=1G ? We already have it -- it's called

Re: [PATCHES] [HACKERS] Patch for Prevent pg_dump/pg_restore from being affected by statement_timeout

2008-06-23 Thread daveg
On Mon, Jun 23, 2008 at 06:51:28PM -0400, Bruce Momjian wrote: Alex Hunsaker wrote: On Wed, Apr 16, 2008 at 4:54 PM, Alvaro Herrera [EMAIL PROTECTED] wrote: Joshua D. Drake escribi?: That is an interesting idea. Something like: pg_restore -E SET STATEMENT_TIMEOUT=0; SET

Re: [PATCHES] [HACKERS] Patch for Prevent pg_dump/pg_restore from being affected by statement_timeout

2008-06-23 Thread Bruce Momjian
daveg wrote: On Mon, Jun 23, 2008 at 06:51:28PM -0400, Bruce Momjian wrote: Alex Hunsaker wrote: On Wed, Apr 16, 2008 at 4:54 PM, Alvaro Herrera [EMAIL PROTECTED] wrote: Joshua D. Drake escribi?: That is an interesting idea. Something like: pg_restore -E SET

Re: [PATCHES] variadic function support

2008-06-23 Thread Tom Lane
Andrew Dunstan [EMAIL PROTECTED] writes: Tom Lane wrote: What would you consider proper and full support? I don't know. But this doesn't feel like it. That's a fairly weak argument for rejecting a patch that provides a feature many people have asked for. I thought the patch was pretty

Re: [PATCHES] variadic function support

2008-06-23 Thread Andrew Dunstan
Tom Lane wrote: Andrew Dunstan [EMAIL PROTECTED] writes: Tom Lane wrote: What would you consider proper and full support? I don't know. But this doesn't feel like it. That's a fairly weak argument for rejecting a patch that provides a feature many people have asked

Re: [PATCHES] variadic function support

2008-06-23 Thread Tom Lane
Andrew Dunstan [EMAIL PROTECTED] writes: But if I have foo( a text, b int[]) it looks odd if both these calls are legal: foo('a',1,2,3,) foo('a',ARRAY[1,2,3]) which I understand would be the case with the current patch. Maybe I misunderstand what is supposed to happen, but I believe

Re: [PATCHES] variadic function support

2008-06-23 Thread Andrew Dunstan
Tom Lane wrote: Your point about the syntax is good though. It would be better if the syntax were like create function foo (a text, variadic b int[]) or maybe even better create function foo (a text, variadic b int) since (a) this makes it much more obvious to the reader

Re: [PATCHES] variadic function support

2008-06-23 Thread Pavel Stehule
2008/6/24 Andrew Dunstan [EMAIL PROTECTED]: Tom Lane wrote: Your point about the syntax is good though. It would be better if the syntax were like create function foo (a text, variadic b int[]) or maybe even better create function foo (a text, variadic b int) since (a)

Re: [PATCHES] variadic function support

2008-06-23 Thread Pavel Stehule
2008/6/23 Andrew Dunstan [EMAIL PROTECTED]: And what about a function that takes 2 arrays as arguments? only last argument is evaluated as variadic so function create or replace function foo(a int[], b int[]) ... variadic is called select foo(array[1,2,3], 1,2,3,4,5,6) This proposal