Re: [HACKERS] WIP: RangeTypes

2011-01-29 Thread Thom Brown
On 30 January 2011 02:55, Thom Brown wrote: > On 29 January 2011 19:53, Jeff Davis wrote: >> On Sat, 2011-01-29 at 14:42 -0500, Tom Lane wrote: >>> Jeff Davis writes: >>> > On Fri, 2011-01-28 at 21:52 +, Thom Brown wrote: >>> > Also, if I try the same, but with a different name for the type,

Re: [HACKERS] WIP: RangeTypes

2011-01-29 Thread Thom Brown
On 29 January 2011 19:53, Jeff Davis wrote: > On Sat, 2011-01-29 at 14:42 -0500, Tom Lane wrote: >> Jeff Davis writes: >> > On Fri, 2011-01-28 at 21:52 +, Thom Brown wrote: >> > Also, if I try the same, but with a different name for the type, I get >> > the same error.  Why does that restrict

Re: [HACKERS] Change pg_last_xlog_receive_location not to move backwards

2011-01-29 Thread Jeff Janes
On Tue, Jan 25, 2011 at 6:38 PM, Fujii Masao wrote: >> The third seems more problematic.  In the XLogPageRead, >> it checks to see if more records have been received beyond what >> has been applied.  By using the non-retreating value here, it seems >> like the xlog replay could start replaying re

Re: [HACKERS] [Mingw-users] mingw64

2011-01-29 Thread Andrew Dunstan
On 01/29/2011 08:26 AM, Peter Rosin wrote: Maybe that's true. But Windows doesn't come wth zic nor a timezone database like Unix usually has. Part of the reason we started maintaining our own timezone sets was that we needed it on Windows. And since we do mke rovision for that, jumping through

Re: [HACKERS] [Mingw-users] mingw64

2011-01-29 Thread Peter Rosin
>> Maybe that's true. But Windows doesn't come wth zic nor a timezone >> database like Unix usually has. Part of the reason we started >> maintaining our own timezone sets was that we needed it on Windows. And >> since we do mke rovision for that, jumping through these hoops seems >> silly. I'm muc

Re: [HACKERS] pl/python SPI in subtransactions

2011-01-29 Thread Jan Urbański
On 29/01/11 22:10, Steve Singer wrote: > On 11-01-29 03:39 PM, Jan Urbański wrote: >> >> D'oh, you're right, thanks. Attached patch with fix. Curiosly, right now >> in master your example with plpy.prepare will result in "savepoint" >> being swallowed, but it's of course better to react with an err

Re: [HACKERS] pl/python SPI in subtransactions

2011-01-29 Thread Steve Singer
On 11-01-29 03:39 PM, Jan Urbański wrote: D'oh, you're right, thanks. Attached patch with fix. Curiosly, right now in master your example with plpy.prepare will result in "savepoint" being swallowed, but it's of course better to react with an error. Cheers, Jan This seems to fix it. You ment

Re: [HACKERS] pl/python SPI in subtransactions

2011-01-29 Thread Jan Urbański
On 29/01/11 21:27, Steve Singer wrote: > On 11-01-27 04:33 PM, Jan Urbański wrote: >>> I am finding the treatment of savepoints very strange. >>> If as a function author I'm able to recover from errors then I'd expect >>> (or maybe want) to be able to manage them through savepoints >> Ooops, you fo

Re: [HACKERS] pl/python SPI in subtransactions

2011-01-29 Thread Steve Singer
On 11-01-27 04:33 PM, Jan Urbański wrote: Right, without the patch you can never catch errors originating from plpy.execute, so any error terminates the whole function, and so rolls back the statement. FWIW PL/Perl works the same: begin; create table foo(i int primary key); DO $$ spi_exec_query

Re: [HACKERS] SPI_exec doesn't return proc context (on 9.1)

2011-01-29 Thread Pavel Stehule
2011/1/29 Tom Lane : > Pavel Stehule writes: >> I am playing with demos for PostgreSQL's Prague Developer Day and I >> found a strange behave. SPI_exec should to return to proc context. But >> it isn't true. > > Yes it is. ah, I though a savedctx, but it restore procctx, that is child context of

Re: [HACKERS] WIP: RangeTypes

2011-01-29 Thread Jeff Davis
On Sat, 2011-01-29 at 14:42 -0500, Tom Lane wrote: > Jeff Davis writes: > > On Fri, 2011-01-28 at 21:52 +, Thom Brown wrote: > > Also, if I try the same, but with a different name for the type, I get > > the same error. Why does that restriction exist? Can't you have > > types which happen t

Re: [HACKERS] WIP: RangeTypes

2011-01-29 Thread Tom Lane
Jeff Davis writes: > On Fri, 2011-01-28 at 21:52 +, Thom Brown wrote: > Also, if I try the same, but with a different name for the type, I get > the same error. Why does that restriction exist? Can't you have > types which happen to use the exact same subtype? > At first, that's how I desig

Re: [HACKERS] SPI_exec doesn't return proc context (on 9.1)

2011-01-29 Thread Tom Lane
Pavel Stehule writes: > I am playing with demos for PostgreSQL's Prague Developer Day and I > found a strange behave. SPI_exec should to return to proc context. But > it isn't true. Yes it is. > In following demo, I have to play with MemoryContext > when I would to get a correct result. Is it ok

Re: [HACKERS] WIP: RangeTypes

2011-01-29 Thread Jeff Davis
On Sat, 2011-01-29 at 11:00 -0800, David E. Wheeler wrote: > I think I'm just revealing my ignorance of these index types and what > they're good for. My impression has been that GIN was a better but > less-full-featured alternative to GiST and getting better with Tom's > recent fixes for its handl

Re: [HACKERS] Snapshots no longer build

2011-01-29 Thread Magnus Hagander
On Sat, Jan 29, 2011 at 18:33, Tom Lane wrote: > Magnus Hagander writes: >> The snapshot builds are failing with: >> openjade:installation.sgml:1010:58:X: reference to non-existent ID >> "UUID-OSSP" >> openjade:installation.sgml:1044:54:X: reference to non-existent ID "XML2" >> openjade:/usr/loc

Re: [HACKERS] REVIEW: WIP: plpgsql - foreach in

2011-01-29 Thread Pavel Stehule
2011/1/29 Stephen Frost : > * Tom Lane (t...@sss.pgh.pa.us) wrote: >> See also >> http://archives.postgresql.org/pgsql-hackers/2010-12/msg01579.php >> which tries to draw a clear distinction between what FOR does and what >> FOREACH does. > > Thanks for that, somehow I had missed that post previous

Re: [HACKERS] WIP: RangeTypes

2011-01-29 Thread Jeff Davis
On Fri, 2011-01-28 at 14:15 -0500, Chris Browne wrote: > Mind you, timestamptzrange seems a mite *long* to me. Right. I think we might need to compromise here an use some shorter names. tsrange/tstzrange/numrange seem reasonable to me. > Making sure it's consistent with int4, int8, bigint sure se

Re: [HACKERS] REVIEW: WIP: plpgsql - foreach in

2011-01-29 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: > See also > http://archives.postgresql.org/pgsql-hackers/2010-12/msg01579.php > which tries to draw a clear distinction between what FOR does and what > FOREACH does. Thanks for that, somehow I had missed that post previously. I think I can get behind the i

Re: [HACKERS] WIP: RangeTypes

2011-01-29 Thread David E. Wheeler
On Jan 29, 2011, at 10:57 AM, Jeff Davis wrote: > On Fri, 2011-01-28 at 10:41 -0800, David E. Wheeler wrote: >> +1 in principal. I think we should try to avoid the user of the term >> "period" if possible, and I see definite benefits to a simple model of >> $typename . 'range'; > > Interesting, I

Re: [HACKERS] WIP: RangeTypes

2011-01-29 Thread Thom Brown
On 29 January 2011 18:52, Jeff Davis wrote: > On Fri, 2011-01-28 at 21:52 +, Thom Brown wrote: >> Also, how do you remove a range type which coincides with a system >> range type.  For example: >> >> postgres=#  CREATE TYPE numrange AS RANGE (SUBTYPE=interval, >>    SUBTYPE_CMP=interval_cmp);

Re: [HACKERS] WIP: RangeTypes

2011-01-29 Thread Jeff Davis
On Fri, 2011-01-28 at 10:41 -0800, David E. Wheeler wrote: > +1 in principal. I think we should try to avoid the user of the term > "period" if possible, and I see definite benefits to a simple model of > $typename . 'range'; Interesting, I didn't realize that PERIOD was such an undesirable type n

Re: [HACKERS] WIP: RangeTypes

2011-01-29 Thread Jeff Davis
On Fri, 2011-01-28 at 21:52 +, Thom Brown wrote: > > This is not very graceful: > > > > postgres=# CREATE TYPE numrange AS RANGE (SUBTYPE=numeric, > > SUBTYPE_CMP=numeric_cmp); > > ERROR: duplicate key value violates unique constraint > > "pg_range_rgnsubtype_index" > > DETAIL: Key (rngsub

[HACKERS] SPI_exec doesn't return proc context (on 9.1)

2011-01-29 Thread Pavel Stehule
Hello I am playing with demos for PostgreSQL's Prague Developer Day and I found a strange behave. SPI_exec should to return to proc context. But it isn't true. In following demo, I have to play with MemoryContext when I would to get a correct result. Is it ok? /* * contrib/citext/p2d2.c */ #inc

Re: [HACKERS] Snapshots no longer build

2011-01-29 Thread Thom Brown
On 29 January 2011 17:58, Tom Lane wrote: > Thom Brown writes: >> On 29 January 2011 11:12, Magnus Hagander wrote: >>> Any idea why this is happening? > >> I don't know what's causing that since I can see both of those IDs are >> present, but I should also mention that the identities those linke

Re: [HACKERS] Re: [COMMITTERS] pgsql: Get rid of the global variable holding the error state

2011-01-29 Thread Peter Eisentraut
On tor, 2011-01-27 at 00:25 +0100, Jan Urbański wrote: > _2 is only Python 2.2, but I tried: with Python 2.2 there's a whole > lot of regression tests that fail. The last release of 2.2 is April > 2003, maybe it's time to forget about that particular dinosaur? I agree that we should remove the plp

Re: [HACKERS] REVIEW: WIP: plpgsql - foreach in

2011-01-29 Thread Tom Lane
Stephen Frost writes: > * Pavel Stehule (pavel.steh...@gmail.com) wrote: >> You have a similar opinion like me about design this statement. But >> there are others with strong negative opinion. For someone ARRAY ARRAY >> should be a problem. So FOREACH is third way - more, it increase a >> possibi

Re: [HACKERS] Snapshots no longer build

2011-01-29 Thread Tom Lane
Thom Brown writes: > On 29 January 2011 11:12, Magnus Hagander wrote: >> Any idea why this is happening? > I don't know what's causing that since I can see both of those IDs are > present, but I should also mention that the identities those linkends > point to should have xreflabel attributes.

Re: [HACKERS] Snapshots no longer build

2011-01-29 Thread Tom Lane
Magnus Hagander writes: > The snapshot builds are failing with: > openjade:installation.sgml:1010:58:X: reference to non-existent ID "UUID-OSSP" > openjade:installation.sgml:1044:54:X: reference to non-existent ID "XML2" > openjade:/usr/local/share/sgml/docbook/dsssl/modular/html/dblink.dsl:203:1:

Re: [HACKERS] REVIEW: Determining client_encoding from client locale

2011-01-29 Thread Peter Eisentraut
On lör, 2011-01-29 at 11:50 -0500, Stephen Frost wrote: > Greetings, > > * Peter Eisentraut (pete...@gmx.net) wrote: > > I have adjusted your old patch for the current tree, and it seems to > > work. I think it was just forgotten last time because the move to > > PQconnectdbParams had to happen f

Re: [HACKERS] pg_upgrade fails for non-postgres user

2011-01-29 Thread Tom Lane
Bernd Helmle writes: > --On 28. Januar 2011 14:49:21 -0800 Josh Berkus wrote: >> The database "postgres" is >> reasonably likely to be dropped, whereas template1 doesn't get touched >> usually. > This is true for a bunch of installations i know. Maybe it's worth to make > it a command line swit

[HACKERS] REVIEW: Determining client_encoding from client locale

2011-01-29 Thread Stephen Frost
Greetings, * Peter Eisentraut (pete...@gmx.net) wrote: > I have adjusted your old patch for the current tree, and it seems to > work. I think it was just forgotten last time because the move to > PQconnectdbParams had to happen first. But I'll throw it back into the > ring now. Right off the ba

Re: [HACKERS] SSPI client authentication in non-Windows builds

2011-01-29 Thread Magnus Hagander
On Sat, Jan 29, 2011 at 16:22, Magnus Hagander wrote: > On Sat, Jan 29, 2011 at 16:21, Christian Ullrich wrote: >> * Magnus Hagander wrote: >> >>> However, i think the code path down around the error message is simply >>> incorrect. That #ifdef spaghetti is pretty hard to parse, but it gives >>>

Re: [HACKERS] pg_upgrade fails for non-postgres user

2011-01-29 Thread Bernd Helmle
--On 28. Januar 2011 14:49:21 -0800 Josh Berkus wrote: The database "postgres" is reasonably likely to be dropped, whereas template1 doesn't get touched usually. This is true for a bunch of installations i know. Maybe it's worth to make it a command line switch to override the default beha

Re: [HACKERS] SSPI client authentication in non-Windows builds

2011-01-29 Thread Stephen Frost
* Magnus Hagander (mag...@hagander.net) wrote: > They were taken out of the main packaging due to them being a PITA to > deal with in general, IIRC. Yes, making it very difficult for those of us who still need them. :( Stephen signature.asc Description: Digital signature

Re: [HACKERS] SSPI client authentication in non-Windows builds

2011-01-29 Thread Magnus Hagander
On Sat, Jan 29, 2011 at 16:21, Christian Ullrich wrote: > * Magnus Hagander wrote: > >> However, i think the code path down around the error message is simply >> incorrect. That #ifdef spaghetti is pretty hard to parse, but it gives >> the wrong error message (we should say it's sspi that's not av

Re: [HACKERS] SSPI client authentication in non-Windows builds

2011-01-29 Thread Christian Ullrich
* Magnus Hagander wrote: However, i think the code path down around the error message is simply incorrect. That #ifdef spaghetti is pretty hard to parse, but it gives the wrong error message (we should say it's sspi that's not available when we have none of the two options) and/or a "duplicate c

Re: [HACKERS] Do you have a plan to support Simplified Chinese Locale

2011-01-29 Thread Andrew Dunstan
On 01/29/2011 04:49 AM, Xiaobo Gu wrote: Hi, Or can you give some instructions about how to do this, thanks. Please read the documentation (preferably before asking questions): The EUC_CN encoding can be used for Simplified

Re: [HACKERS] Spread checkpoint sync

2011-01-29 Thread Robert Haas
On Fri, Jan 28, 2011 at 12:53 AM, Greg Smith wrote: > Where there are still very ugly maximum latency figures here in every case, > these periods just aren't as wide with the patch in place. OK, committed the patch, with some additional commenting, and after fixing the compiler warning Chris Brow

Re: [HACKERS] REVIEW: WIP: plpgsql - foreach in

2011-01-29 Thread Stephen Frost
* Pavel Stehule (pavel.steh...@gmail.com) wrote: > You have a similar opinion like me about design this statement. But > there are others with strong negative opinion. For someone ARRAY ARRAY > should be a problem. So FOREACH is third way - more, it increase a > possibility for enhancing plpgsql in

Re: [HACKERS] REVIEW: WIP: plpgsql - foreach in

2011-01-29 Thread Pavel Stehule
2011/1/29 Stephen Frost : > * Pavel Stehule (pavel.steh...@gmail.com) wrote: >> I don't see a problem too, but we didn't find a compromise with this >> syntax, so I left it. It is true, so current implementation of FOR >> stmt is really baroque and next argument is a compatibility with >> PL/SQL. M

Re: [HACKERS] REVIEW: WIP: plpgsql - foreach in

2011-01-29 Thread Stephen Frost
* Pavel Stehule (pavel.steh...@gmail.com) wrote: > please, can you look on code that I sent last time? I'm looking at it now and I still don't like the big set of conditionals at the beginning which sets things up. I do think the loop is a bit better, but have you considered factoring out the arr

Re: [HACKERS] Snapshots no longer build

2011-01-29 Thread Thom Brown
On 29 January 2011 11:12, Magnus Hagander wrote: > The snapshot builds are failing with: > > openjade:installation.sgml:1010:58:X: reference to non-existent ID "UUID-OSSP" > openjade:installation.sgml:1044:54:X: reference to non-existent ID "XML2" > openjade:/usr/local/share/sgml/docbook/dsssl/mod

Re: [HACKERS] REVIEW: WIP: plpgsql - foreach in

2011-01-29 Thread Stephen Frost
* Pavel Stehule (pavel.steh...@gmail.com) wrote: > I don't see a problem too, but we didn't find a compromise with this > syntax, so I left it. It is true, so current implementation of FOR > stmt is really baroque and next argument is a compatibility with > PL/SQL. My idea is so FOR stmt will be a

Re: [HACKERS] SSPI client authentication in non-Windows builds

2011-01-29 Thread Magnus Hagander
On Sun, Jan 23, 2011 at 16:02, Christian Ullrich wrote: > * Christian Ullrich wrote: > >> Magnus Hagander wrote: > >>> On Mon, Jan 3, 2011 at 14:11, Christian Ullrich >>> wrote: > This change has been tested and works correctly on FreeBSD 8.1, using the Kerberos and GSSAPI libraries from

Re: [HACKERS] REVIEW: WIP: plpgsql - foreach in

2011-01-29 Thread Pavel Stehule
> >> I'll try to redesign main cycle. > >        Thanks, > please, can you look on code that I sent last time? Pavel >                Stephen > > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.10 (GNU/Linux) > > iEUEARECAAYFAk1EAJwACgkQrzgMPqB3kig5bACdH0fm8Klh7Dq1GlICV/Z8yEd4 > KQoAlRZEeTrB

Re: [HACKERS] wildcard search support for pg_trgm

2011-01-29 Thread Alexander Korotkov
Hello! New version of patch is in the attachment. Some comments was added in this version. Likely these comments need significant correction because of my english. Some notes abount gin interface functions. Extract query and extract value functions was separated, because with wildcard search these

Re: [HACKERS] REVIEW: WIP: plpgsql - foreach in

2011-01-29 Thread Pavel Stehule
2011/1/29 Stephen Frost : > * Itagaki Takahiro (itagaki.takah...@gmail.com) wrote: >> On Mon, Jan 24, 2011 at 13:05, Stephen Frost wrote: >> > FOR var in ARRAY array_expression ... >> > >> > I like that a lot more than inventing a new top-level keyword, >> >> AFAIR, the syntax is not good at an ar

Re: [HACKERS] REVIEW: WIP: plpgsql - foreach in

2011-01-29 Thread Stephen Frost
* Pavel Stehule (pavel.steh...@gmail.com) wrote: > FOR keyword - please, look on thread about my proposal FOR-IN-ARRAY I did, and I still don't agree w/ using FOREACH. > I work with FOUND variable, because I like a consistent behave with > FOR statement. When FOUND is true after cycle, you are su

Re: [HACKERS] REVIEW: WIP: plpgsql - foreach in

2011-01-29 Thread Stephen Frost
* Itagaki Takahiro (itagaki.takah...@gmail.com) wrote: > On Mon, Jan 24, 2011 at 13:05, Stephen Frost wrote: > > FOR var in ARRAY array_expression ... > > > > I like that a lot more than inventing a new top-level keyword, > > AFAIR, the syntax is not good at an array literal. > FOR var IN ARRAY

[HACKERS] Snapshots no longer build

2011-01-29 Thread Magnus Hagander
The snapshot builds are failing with: openjade:installation.sgml:1010:58:X: reference to non-existent ID "UUID-OSSP" openjade:installation.sgml:1044:54:X: reference to non-existent ID "XML2" openjade:/usr/local/share/sgml/docbook/dsssl/modular/html/dblink.dsl:203:1:E: XRef LinkEnd to missing ID 'U

Re: [HACKERS] ALTER TYPE 3: add facility to identify further no-work cases

2011-01-29 Thread Robert Haas
On Sat, Jan 29, 2011 at 3:26 AM, Noah Misch wrote: > One other thing: #7 does not depend on #3,4,5,6 or any design problems raised > thus far, so there's no need to treat it the same as that group. Well, if you want to post an updated patch that's independent of the rest of the series, I guess yo

Re: [HACKERS] ALTER TYPE 3: add facility to identify further no-work cases

2011-01-29 Thread Robert Haas
On Fri, Jan 28, 2011 at 4:49 PM, Noah Misch wrote: >> I'm not necessarily signing on to the viewpoint that >> we should wait to do any of this work until after we refactor >> typemods, but it does strike me that the fact that Tom and I have >> completely different ideas of how this will interact w

[HACKERS] Do you have a plan to support Simplified Chinese Locale

2011-01-29 Thread Xiaobo Gu
Hi, Or can you give some instructions about how to do this, thanks. Xiaobo Gu -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] mingw64

2011-01-29 Thread Xiaobo Gu
> > Why are you cross-compiling? I built without any need to do that. Change the > names of the binaries on the m mingw64/bin directory to remove the platform > prefix, put that directory at the head of your PATH, and run a plain > configure. Works like a charm. I have two work computers, one is 32

Re: [HACKERS] ALTER TYPE 3: add facility to identify further no-work cases

2011-01-29 Thread Noah Misch
On Fri, Jan 28, 2011 at 04:49:39PM -0500, Noah Misch wrote: > On Fri, Jan 28, 2011 at 01:52:32PM -0500, Robert Haas wrote: > > On Wed, Jan 26, 2011 at 6:06 PM, Tom Lane wrote: > > > I'm not sure how important that concern is though, because it's hard to > > > see how any such change wouldn't break