Re: [HACKERS] WIP: named and mixed notation support

2009-03-01 Thread Pavel Stehule
2009/3/2 Tom Lane : > Pavel Stehule writes: >> postgres=# create function dfunc(a int, b int = 1, c int) returns >> table (a int, b int, c int) as $$ >>   select $1, $2, $3; >> $$ language sql; > > The above is simply a horrid idea.  It'll completely break any ability > to resolve ambiguous functi

Re: [HACKERS] Immediate shutdown and system(3)

2009-03-01 Thread Fujii Masao
Hi, On Fri, Feb 27, 2009 at 6:52 PM, Heikki Linnakangas wrote: > We're using SIGQUIT to signal immediate shutdown request. Upon receiving > SIGQUIT, postmaster in turn kills all the child processes with SIGQUIT and > exits. > > This is a problem when child processes use system(3) to call other pr

Re: [HACKERS] patch for space around the FragmentDelimiter

2009-03-01 Thread Sushant Sinha
yeah you are right. I did not know that you can pass space using double quotes. -Sushant. On Sun, 2009-03-01 at 20:49 -0500, Tom Lane wrote: > Sushant Sinha writes: > > FragmentDelimiter is an argument for ts_headline function to separates > > different headline fragments. The default delimiter

Re: [HACKERS] Synchronous replication & Hot standby patches

2009-03-01 Thread Fujii Masao
Hi, On Sun, Mar 1, 2009 at 4:21 PM, Josh Berkus wrote: > While Simon stated it a bit strongly, I think it's important that you alert > people if you think you have to remove existing features in order to make > easy standby possible. Now, I think that any existing capabilities don't need to be r

Re: [HACKERS] WIP: named and mixed notation support

2009-03-01 Thread Tom Lane
Pavel Stehule writes: > postgres=# create function dfunc(a int, b int = 1, c int) returns > table (a int, b int, c int) as $$ > select $1, $2, $3; > $$ language sql; The above is simply a horrid idea. It'll completely break any ability to resolve ambiguous function calls in a sane way. What,

Re: [HACKERS] patch for space around the FragmentDelimiter

2009-03-01 Thread Tom Lane
Sushant Sinha writes: > FragmentDelimiter is an argument for ts_headline function to separates > different headline fragments. The default delimiter is " ... ". > Currently if someone specifies the delimiter as an option to the > function, no extra space is added around the delimiter. However, it

Re: [HACKERS] cardinality()

2009-03-01 Thread Bruce Momjian
Gregory Stark wrote: > Peter Eisentraut writes: > > > The standard represents multidimensional arrays as arrays of arrays (like > > in > > C). > > Uh, C doesn't represent multidimensional arrays as arrays of arrays so you've > lost me already. I think he meant to say C _can_ represent multidi

Re: [HACKERS] cardinality()

2009-03-01 Thread Gregory Stark
Peter Eisentraut writes: > The standard represents multidimensional arrays as arrays of arrays (like in > C). Uh, C doesn't represent multidimensional arrays as arrays of arrays so you've lost me already. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about En

Re: [HACKERS] xpath processing brain dead

2009-03-01 Thread Andrew Dunstan
Hannu Krosing wrote: On Sun, 2009-03-01 at 10:13 -0500, Andrew Dunstan wrote: Hannu Krosing wrote: Some of the functions, including some specified in the standard, produce fragments. That's why we have the 'IS DOCUMENT' test. But then you could use xmlfragments as the f

Re: [HACKERS] xpath processing brain dead

2009-03-01 Thread Hannu Krosing
On Sun, 2009-03-01 at 10:13 -0500, Andrew Dunstan wrote: > > Hannu Krosing wrote: > >> Some of the functions, including some specified in the standard, produce > >> fragments. That's why we have the 'IS DOCUMENT' test. > >> > > > > But then you could use xmlfragments as the functions return

[HACKERS] patch for space around the FragmentDelimiter

2009-03-01 Thread Sushant Sinha
FragmentDelimiter is an argument for ts_headline function to separates different headline fragments. The default delimiter is " ... ". Currently if someone specifies the delimiter as an option to the function, no extra space is added around the delimiter. However, it does not look good without spac

Re: [HACKERS] cardinality()

2009-03-01 Thread Peter Eisentraut
On Sunday 01 March 2009 19:40:16 Tom Lane wrote: > I wrote: > > The standard doesn't have multi-dimensional arrays, so it's entirely > > possible that somewhere in it there is wording that makes cardinality() > > equivalent to the length of the first dimension. But I concur with > > Andrew that th

Re: [HACKERS] cardinality()

2009-03-01 Thread Stephan Szabo
On Sun, 1 Mar 2009, Tom Lane wrote: > I wrote: > > The standard doesn't have multi-dimensional arrays, so it's entirely > > possible that somewhere in it there is wording that makes cardinality() > > equivalent to the length of the first dimension. But I concur with > > Andrew that this is flat w

Re: [HACKERS] encoding conversion functions versus zero-length inputs

2009-03-01 Thread Heikki Linnakangas
Tom Lane wrote: The REL7_4 members of the buildfarm are all red this morning, with this symptom in initdb: Oh dear. I must confess that I didn't test the 7.4 commit, because the 7.4 branch isn't compiling on my laptop for some reason. Seemed safe enough since the changed codepath hadn't been

Re: [HACKERS] cardinality()

2009-03-01 Thread Pavel Stehule
2009/3/1 Tom Lane : > I wrote: >> The standard doesn't have multi-dimensional arrays, so it's entirely >> possible that somewhere in it there is wording that makes cardinality() >> equivalent to the length of the first dimension.  But I concur with >> Andrew that this is flat wrong when extended to

Re: [HACKERS] cardinality()

2009-03-01 Thread Tom Lane
I wrote: > The standard doesn't have multi-dimensional arrays, so it's entirely > possible that somewhere in it there is wording that makes cardinality() > equivalent to the length of the first dimension. But I concur with > Andrew that this is flat wrong when extended to m-d arrays. I poked arou

Re: [HACKERS] cardinality()

2009-03-01 Thread Tom Lane
Andrew Dunstan writes: > Grzegorz Jaskiewicz wrote: >> On 1 Mar 2009, at 00:52, Andrew Dunstan wrote: >>> We seem to have acquired a cardinality() function with almost no >>> discussion, and it has semantics that are a bit surprising to me. I >>> should have thought cardinality(array) would be t

Re: [HACKERS] cardinality()

2009-03-01 Thread Andrew Dunstan
Grzegorz Jaskiewicz wrote: On 1 Mar 2009, at 00:52, Andrew Dunstan wrote: We seem to have acquired a cardinality() function with almost no discussion, and it has semantics that are a bit surprising to me. I should have thought cardinality(array) would be the total number of elements in t

Re: [HACKERS] xpath processing brain dead

2009-03-01 Thread Andrew Dunstan
Hannu Krosing wrote: Some of the functions, including some specified in the standard, produce fragments. That's why we have the 'IS DOCUMENT' test. But then you could use xmlfragments as the functions return type, no ? Does tha standard require that the same field type must store both d

Re: [HACKERS] cardinality()

2009-03-01 Thread Grzegorz Jaskiewicz
On 1 Mar 2009, at 00:52, Andrew Dunstan wrote: We seem to have acquired a cardinality() function with almost no discussion, and it has semantics that are a bit surprising to me. I should have thought cardinality(array) would be the total number of elements in the array. Instead, it seems

Re: [HACKERS] Synchronous replication & Hot standby patches

2009-03-01 Thread Josh Berkus
Fujii, Again, I'm not planning to get rid of any existing capabilities Good unless necessary. That is not a caveat I will accept, a priori. While Simon stated it a bit strongly, I think it's important that you alert people if you think you have to remove existing features in order to m

Re: [HACKERS] regression test crashes at tsearch

2009-03-01 Thread Hiroshi Saito
Hi Teodor-san. Sorry late reaction. - Original Message - From: "Teodor Sigaev" If there's an effective function like pg_wchar2mb_with_len() which converts wchar_t strings to server encoded strings, we had better simply call it for char2wchar(). I don't see a way to produce correct

Re: [HACKERS] Synchronous replication & Hot standby patches

2009-03-01 Thread Simon Riggs
On Sat, 2009-02-28 at 23:21 -0800, Josh Berkus wrote: > Fujii, > > >> Again, I'm not planning to get rid of any existing capabilities > > > > Good > > > >> unless necessary. > > > > That is not a caveat I will accept, a priori. > > While Simon stated it a bit strongly My intention was only