Re: [HACKERS] CommitFest 2009-07: Yay, Kevin! Thanks, reviewers!

2010-08-19 Thread Heikki Linnakangas
On 19/08/10 04:46, Robert Haas wrote: At any rate, we should definitely NOT wait another month to start thinking about Sync Rep again. Agreed. EnterpriseDB is interested in having that feature, so I'm on the hook to spend time on it regardless of commitfests. I haven't actually looked at

[HACKERS] Re: [COMMITTERS] pgsql: Coerce 'unknown' type parameters to the right type in the

2010-08-19 Thread Heikki Linnakangas
On 18/08/10 18:03, Heikki Linnakangas wrote: On 18/08/10 16:57, Tom Lane wrote: hei...@postgresql.org (Heikki Linnakangas) writes: Log Message: --- Coerce 'unknown' type parameters to the right type in the fixed-params parse_analyze() function. That case occurs e.g with PL/pgSQL

[HACKERS] PL/pgsSQL EXECUTE USING INTO

2010-08-19 Thread Heikki Linnakangas
While testing the recent issue with unknown params in EXECUTE USING, I accidentally did this: postgres=# DO $$ DECLARE t text; BEGIN EXECUTE 'SELECT ''foo'' || $1' USING 'bar' INTO t; RAISE NOTICE '%', t; END; $$; NOTICE: NULL DO The mistake I made? I put the USING and INTO clauses in

Re: [HACKERS] git: uh-oh

2010-08-19 Thread Magnus Hagander
On Thu, Aug 19, 2010 at 07:00, Michael Haggerty mhag...@alum.mit.edu wrote: Magnus Hagander wrote: Is there some way to make cvs2git work this way, and just not bother even trying to create merge commits, or is that fundamentally impossible and we need to look at another tool? The good news:

Re: [HACKERS] proposal: tuplestore, tuplesort aggregate functions

2010-08-19 Thread Pavel Stehule
Hello I'll test both variant first. Maybe there are not any significant difference between them. Now nodeAgg can build, fill a tuplesort. So I think is natural use it. It needs only one - skip a calling a transident function and directly call final function with external tuplesort.

[HACKERS] wip: functions median and percentile

2010-08-19 Thread Pavel Stehule
Hello I am sending a prototype implementation of functions median and percentile. This implementation is very simple and I moved it to contrib for this moment - it is more easy maintainable. Later I'll move it to core. These functions are relative simple, there are not barrier for implementation

Re: [HACKERS] PL/pgsSQL EXECUTE USING INTO

2010-08-19 Thread Robert Haas
On Thu, Aug 19, 2010 at 4:29 AM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: While testing the recent issue with unknown params in EXECUTE USING, I accidentally did this: postgres=# DO $$ DECLARE  t text; BEGIN  EXECUTE 'SELECT ''foo'' || $1' USING 'bar' INTO t;  RAISE

Re: [HACKERS] CommitFest 2009-07: Yay, Kevin! Thanks, reviewers!

2010-08-19 Thread Tom Lane
Heikki Linnakangas heikki.linnakan...@enterprisedb.com writes: BTW, on what platforms signals don't interrupt sleep? Although that issue has been discussed many times before, I couldn't find any reference to a real platform in the archives. I've got one in captivity (my old HPUX box). Happy

Re: [HACKERS] proposal: tuplestore, tuplesort aggregate functions

2010-08-19 Thread David Fetter
On Thu, Aug 19, 2010 at 12:45:13PM +0200, Pavel Stehule wrote: Hello I'll test both variant first. Maybe there are not any significant difference between them. Now nodeAgg can build, fill a tuplesort. So I think is natural use it. It needs only one - skip a calling a transident function

Re: [HACKERS] Re: [COMMITTERS] pgsql: Coerce 'unknown' type parameters to the right type in the

2010-08-19 Thread Tom Lane
Heikki Linnakangas heikki.linnakan...@enterprisedb.com writes: I'm starting to wonder if it's worth enforcing the rule that all unknown Params must be coerced to the same target type. We could just document the behavior. Or maybe we should revert the whole thing, and add a check to PL/pgSQL

Re: [HACKERS] proposal: tuplestore, tuplesort aggregate functions

2010-08-19 Thread Pavel Stehule
2010/8/19 David Fetter da...@fetter.org: On Thu, Aug 19, 2010 at 12:45:13PM +0200, Pavel Stehule wrote: Hello I'll test both variant first. Maybe there are not any significant difference between them. Now nodeAgg can build, fill a tuplesort. So I think is natural use it. It needs only one

Re: [HACKERS] wip: functions median and percentile

2010-08-19 Thread Greg Stark
On Thu, Aug 19, 2010 at 11:59 AM, Pavel Stehule pavel.steh...@gmail.com wrote: I am sending a prototype implementation of functions median and percentile. This implementation is very simple and I moved it to contrib for this moment - it is more easy maintainable. Later I'll move it to core.

Re: [HACKERS] Re: [COMMITTERS] pgsql: Coerce 'unknown' type parameters to the right type in the

2010-08-19 Thread Robert Haas
On Thu, Aug 19, 2010 at 9:47 AM, Tom Lane t...@sss.pgh.pa.us wrote: Another possibility is for EXECUTE USING to coerce any unknowns to TEXT before it calls the parser at all.  This would square with the typical default assumption for unknown literals, and it would avoid having to have any

Re: [HACKERS] CommitFest 2009-07: Yay, Kevin! Thanks, reviewers!

2010-08-19 Thread Alvaro Herrera
Excerpts from Heikki Linnakangas's message of jue ago 19 02:02:34 -0400 2010: On 19/08/10 04:46, Robert Haas wrote: And so far we haven't seen a patch for that. Somebody write one. And then let's get it reviewed and committed RSN. Fujii is on vacation, but I've started working on it.

Re: [HACKERS] Re: [COMMITTERS] pgsql: Coerce 'unknown' type parameters to the right type in the

2010-08-19 Thread David E. Wheeler
On Aug 19, 2010, at 8:08 AM, Robert Haas wrote: Another possibility is for EXECUTE USING to coerce any unknowns to TEXT before it calls the parser at all. This would square with the typical default assumption for unknown literals, and it would avoid having to have any semantics changes below

Re: [HACKERS] CommitFest 2009-07: Yay, Kevin! Thanks, reviewers!

2010-08-19 Thread Magnus Hagander
On Thu, Aug 19, 2010 at 17:08, Alvaro Herrera alvhe...@commandprompt.com wrote: Excerpts from Heikki Linnakangas's message of jue ago 19 02:02:34 -0400 2010: On 19/08/10 04:46, Robert Haas wrote:  And so far we haven't seen a patch for that. Somebody write one.  And then let's get it

Re: [HACKERS] PL/pgsSQL EXECUTE USING INTO

2010-08-19 Thread Alvaro Herrera
Excerpts from Heikki Linnakangas's message of jue ago 19 04:29:19 -0400 2010: While testing the recent issue with unknown params in EXECUTE USING, I accidentally did this: postgres=# DO $$ DECLARE t text; BEGIN EXECUTE 'SELECT ''foo'' || $1' USING 'bar' INTO t; RAISE NOTICE

[HACKERS] FTS wildcard and custom ispell dictionary problem

2010-08-19 Thread darklow
Hello,  I am using PostgreSQL 8.4 full text search in following way:  Custom FTS configuration called dc2 with these dictionaries in following order for asciihword token: latvian_ispell, english_stem, russian_stem  Latvian ispell dictionary contains words with different endings but same meaning

Re: [HACKERS] wip: functions median and percentile

2010-08-19 Thread Tom Lane
Greg Stark gsst...@mit.edu writes: On Thu, Aug 19, 2010 at 11:59 AM, Pavel Stehule pavel.steh...@gmail.com wrote: I am sending a prototype implementation of functions median and percentile. This implementation is very simple and I moved it to contrib for this moment - it is more easy

Re: [HACKERS] refactoring comment.c

2010-08-19 Thread Alvaro Herrera
Excerpts from Robert Haas's message of mié ago 18 21:32:48 -0400 2010: Here's v3. The header comment in objectaddress.c contains a funny mistake: it says it works with ObjectAddresses. However, ObjectAddresses is a different type altogether, so I recommend not using that as plural for

Re: [HACKERS] Fw: patch for pg_ctl.c to add windows service start-type

2010-08-19 Thread David Fetter
On Thu, Aug 19, 2010 at 10:24:54PM +0800, Quan Zongliang wrote: documents attached. html and man-page Thanks! For future reference, the way to patch docs is by patching the SGML source. Please find enclosed a patch which incorporates the code patch you sent with these docs. Cheers, David. --

Re: [HACKERS] refactoring comment.c

2010-08-19 Thread Tom Lane
Alvaro Herrera alvhe...@commandprompt.com writes: Excerpts from Robert Haas's message of mié ago 18 21:32:48 -0400 2010: Here's v3. The header comment in objectaddress.c contains a funny mistake: it says it works with ObjectAddresses. However, ObjectAddresses is a different type

Re: [HACKERS] refactoring comment.c

2010-08-19 Thread Robert Haas
On Thu, Aug 19, 2010 at 11:57 AM, Tom Lane t...@sss.pgh.pa.us wrote: Alvaro Herrera alvhe...@commandprompt.com writes: Excerpts from Robert Haas's message of mié ago 18 21:32:48 -0400 2010: Here's v3. The header comment in objectaddress.c contains a funny mistake: it says it works with

Re: [HACKERS] CommitFest 2009-07: Yay, Kevin! Thanks, reviewers!

2010-08-19 Thread Heikki Linnakangas
On 19/08/10 18:08, Alvaro Herrera wrote: Excerpts from Heikki Linnakangas's message of jue ago 19 02:02:34 -0400 2010: On 19/08/10 04:46, Robert Haas wrote: And so far we haven't seen a patch for that. Somebody write one. And then let's get it reviewed and committed RSN. Fujii is on

Re: [HACKERS] CommitFest 2009-07: Yay, Kevin! Thanks, reviewers!

2010-08-19 Thread Heikki Linnakangas
On 19/08/10 16:38, Tom Lane wrote: Heikki Linnakangasheikki.linnakan...@enterprisedb.com writes: BTW, on what platforms signals don't interrupt sleep? Although that issue has been discussed many times before, I couldn't find any reference to a real platform in the archives. I've got one in

Re: [HACKERS] wip: functions median and percentile

2010-08-19 Thread Robert Haas
On Thu, Aug 19, 2010 at 11:33 AM, Tom Lane t...@sss.pgh.pa.us wrote: Greg Stark gsst...@mit.edu writes: On Thu, Aug 19, 2010 at 11:59 AM, Pavel Stehule pavel.steh...@gmail.com wrote: I am sending a prototype implementation of functions median and percentile. This implementation is very

Re: [HACKERS] PL/pgsSQL EXECUTE USING INTO

2010-08-19 Thread Tom Lane
Heikki Linnakangas heikki.linnakan...@enterprisedb.com writes: While testing the recent issue with unknown params in EXECUTE USING, I accidentally did this: EXECUTE 'SELECT ''foo'' || $1' USING 'bar' INTO t; The mistake I made? I put the USING and INTO clauses in wrong order, INTO

Re: [HACKERS] Re: [COMMITTERS] pgsql: Coerce 'unknown' type parameters to the right type in the

2010-08-19 Thread Heikki Linnakangas
On 19/08/10 18:08, Robert Haas wrote: On Thu, Aug 19, 2010 at 9:47 AM, Tom Lanet...@sss.pgh.pa.us wrote: Another possibility is for EXECUTE USING to coerce any unknowns to TEXT before it calls the parser at all. This would square with the typical default assumption for unknown literals, and

Re: [HACKERS] CommitFest 2009-07: Yay, Kevin! Thanks, reviewers!

2010-08-19 Thread Tom Lane
Heikki Linnakangas heikki.linnakan...@enterprisedb.com writes: On 19/08/10 16:38, Tom Lane wrote: Considering that pg_usleep is implemented with select, I'm not following what you mean by replace pg_usleep() with select()? Instead of using pg_usleep(), call select() directly, waiting not only

Re: [HACKERS] wip: functions median and percentile

2010-08-19 Thread David Fetter
On Thu, Aug 19, 2010 at 12:49:45PM -0400, Robert Haas wrote: On Thu, Aug 19, 2010 at 11:33 AM, Tom Lane t...@sss.pgh.pa.us wrote: Greg Stark gsst...@mit.edu writes: On Thu, Aug 19, 2010 at 11:59 AM, Pavel Stehule pavel.steh...@gmail.com wrote: I am sending a prototype implementation of

Re: [HACKERS] CommitFest 2009-07: Yay, Kevin! Thanks, reviewers!

2010-08-19 Thread Heikki Linnakangas
On 19/08/10 19:57, Tom Lane wrote: Heikki Linnakangasheikki.linnakan...@enterprisedb.com writes: On 19/08/10 16:38, Tom Lane wrote: Considering that pg_usleep is implemented with select, I'm not following what you mean by replace pg_usleep() with select()? Instead of using pg_usleep(),

Re: [HACKERS] wip: functions median and percentile

2010-08-19 Thread Kevin Grittner
David Fetter da...@fetter.org wrote: Median may be useful, but we pretty much can't just call it median. Instead, we need to call it something like left_median or arithmetic_median. I think it would be reasonable, and perhaps preferable, to use just median for the semantics described in

Re: [HACKERS] wip: functions median and percentile

2010-08-19 Thread David Fetter
On Thu, Aug 19, 2010 at 12:12:12PM -0500, Kevin Grittner wrote: David Fetter da...@fetter.org wrote: Median may be useful, but we pretty much can't just call it median. Instead, we need to call it something like left_median or arithmetic_median. I think it would be reasonable, and

Re: [HACKERS] CommitFest 2009-07: Yay, Kevin! Thanks, reviewers!

2010-08-19 Thread Tom Lane
Heikki Linnakangas heikki.linnakan...@enterprisedb.com writes: On 19/08/10 19:57, Tom Lane wrote: Hmm, but couldn't you still do that inside pg_usleep? Signal handlers that do that couldn't know if they were interrupting a sleep per se, so this would have to be a backend-wide convention. I

Re: [HACKERS] wip: functions median and percentile

2010-08-19 Thread Tom Lane
David Fetter da...@fetter.org writes: On Thu, Aug 19, 2010 at 12:12:12PM -0500, Kevin Grittner wrote: http://www.merriam-webster.com/dictionary/median If you do a google search for median and poke around, you'll find many places where this is the only definition mentioned; the others seem

Re: [HACKERS] CommitFest 2009-07: Yay, Kevin! Thanks, reviewers!

2010-08-19 Thread Heikki Linnakangas
On 19/08/10 20:18, Tom Lane wrote: Heikki Linnakangasheikki.linnakan...@enterprisedb.com writes: On 19/08/10 19:57, Tom Lane wrote: Hmm, but couldn't you still do that inside pg_usleep? Signal handlers that do that couldn't know if they were interrupting a sleep per se, so this would have to

Re: [HACKERS] wip: functions median and percentile

2010-08-19 Thread Pavel Stehule
2010/8/19 David Fetter da...@fetter.org: On Thu, Aug 19, 2010 at 12:49:45PM -0400, Robert Haas wrote: On Thu, Aug 19, 2010 at 11:33 AM, Tom Lane t...@sss.pgh.pa.us wrote: Greg Stark gsst...@mit.edu writes: On Thu, Aug 19, 2010 at 11:59 AM, Pavel Stehule pavel.steh...@gmail.com wrote: I

Re: [HACKERS] wip: functions median and percentile

2010-08-19 Thread Pavel Stehule
2010/8/19 David Fetter da...@fetter.org: On Thu, Aug 19, 2010 at 12:12:12PM -0500, Kevin Grittner wrote: David Fetter da...@fetter.org wrote: Median may be useful, but we pretty much can't just call it median. Instead, we need to call it something like left_median or arithmetic_median.

Re: [HACKERS] wip: functions median and percentile

2010-08-19 Thread David Fetter
On Thu, Aug 19, 2010 at 01:25:36PM -0400, Tom Lane wrote: David Fetter da...@fetter.org writes: On Thu, Aug 19, 2010 at 12:12:12PM -0500, Kevin Grittner wrote: http://www.merriam-webster.com/dictionary/median If you do a google search for median and poke around, you'll find many places

Re: [HACKERS] CommitFest 2009-07: Yay, Kevin! Thanks, reviewers!

2010-08-19 Thread Tom Lane
Heikki Linnakangas heikki.linnakan...@enterprisedb.com writes: On 19/08/10 20:18, Tom Lane wrote: But I'm still not seeing how this self-pipe hack avoids a race condition. If the signal handler is sending a byte whenever it executes, then you could have bytes already stacked up in the pipe

Re: [HACKERS] wip: functions median and percentile

2010-08-19 Thread Kevin Grittner
Pavel Stehule pavel.steh...@gmail.com wrote: I looked there and Oracle11g use median in common sense. As does Sybase IQ. FWIW, Excel spreadsheets do, too. The chance of the SQL committee picking some other meaning for bare MEDIAN seems vanishingly small; although I have to grant that with

Re: [HACKERS] wip: functions median and percentile

2010-08-19 Thread Tom Lane
David Fetter da...@fetter.org writes: On Thu, Aug 19, 2010 at 01:25:36PM -0400, Tom Lane wrote: A name like arithmetic_median seems much less likely to get blindsided by future standardization. Yep. OTOH, if Pavel's right that Oracle already has an aggregate named median(), it seems quite

Re: [HACKERS] refactoring comment.c

2010-08-19 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: Any other kibitzing before I commit this? Sure ... + * If the object is a relation or a child object of a relation (e.g. an + * attribute or contraint, *relp will set to point to that relation). This Parenthesis in the wrong place here, grammar and

Re: [HACKERS] Fw: patch for pg_ctl.c to add windows service start-type

2010-08-19 Thread Alvaro Herrera
Excerpts from David Fetter's message of jue ago 19 11:48:53 -0400 2010: +varlistentry + termoption-S replaceable class=parameter/replaceable/option/term You omitted the start-type inside the replaceable tag. Also, the a and d values seem to be accepted but not documented. --

Re: [HACKERS] proposal: tuplestore, tuplesort aggregate functions

2010-08-19 Thread Robert Haas
On Thu, Aug 19, 2010 at 9:46 AM, David Fetter da...@fetter.org wrote: As to median, please make sure you say in detail which median you're using and name it so, as there is no single, authoritative median. You've made this assertion at least three times now, but I confess that I've only ever

Re: [HACKERS] proposal: tuplestore, tuplesort aggregate functions

2010-08-19 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: You've made this assertion at least three times now, but I confess that I've only ever learned one way to compute a median; and quick Google searches for median, kinds of median, and few other variants failed to turn up anything obvious either. There

Re: [HACKERS] proposal: tuplestore, tuplesort aggregate functions

2010-08-19 Thread Robert Haas
On Thu, Aug 19, 2010 at 4:21 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: You've made this assertion at least three times now, but I confess that I've only ever learned one way to compute a median; and quick Google searches for median, kinds of median, and

Re: [HACKERS] proposal: tuplestore, tuplesort aggregate functions

2010-08-19 Thread Kevin Grittner
Robert Haas robertmh...@gmail.com wrote: I suppose there could also be a bit of an ambiguity if you're working with a type like int4 where the values are discrete steps. Like, what do you do with {1, 2}? The same thing you do with the avg function? -Kevin -- Sent via pgsql-hackers

Re: [HACKERS] Fw: patch for pg_ctl.c to add windows service start-type

2010-08-19 Thread David Fetter
On Thu, Aug 19, 2010 at 03:47:43PM -0400, Alvaro Herrera wrote: Excerpts from David Fetter's message of jue ago 19 11:48:53 -0400 2010: +varlistentry + termoption-S replaceable class=parameter/replaceable/option/term You omitted the start-type inside the replaceable tag.

Re: [HACKERS] Fw: patch for pg_ctl.c to add windows service start-type

2010-08-19 Thread Alvaro Herrera
Excerpts from David Fetter's message of jue ago 19 16:40:18 -0400 2010: On Thu, Aug 19, 2010 at 03:47:43PM -0400, Alvaro Herrera wrote: Excerpts from David Fetter's message of jue ago 19 11:48:53 -0400 2010: +varlistentry + termoption-S replaceable

[HACKERS] small typed-table bug in gram.y

2010-08-19 Thread Robert Haas
While examining gram.y today I happened to notice an oversight in the grammar rules for creating typed tables: the fourth CREATE TABLE production ignores $2. Which I think means (although of course I didn't test it) that if you do something like CREATE TEMP TABLE IF NOT EXISTS foo OF bar, the

Re: [HACKERS] Fw: patch for pg_ctl.c to add windows service start-type

2010-08-19 Thread David Fetter
On Thu, Aug 19, 2010 at 04:48:53PM -0400, Alvaro Herrera wrote: Excerpts from David Fetter's message of jue ago 19 16:40:18 -0400 2010: On Thu, Aug 19, 2010 at 03:47:43PM -0400, Alvaro Herrera wrote: Excerpts from David Fetter's message of jue ago 19 11:48:53 -0400 2010: +

Re: [HACKERS] small typed-table bug in gram.y

2010-08-19 Thread Kevin Grittner
Robert Haas robertmh...@gmail.com wrote: While examining gram.y today I happened to notice an oversight in the grammar rules for creating typed tables: the fourth CREATE TABLE production ignores $2. Which I think means (although of course I didn't test it) that if you do something like

Re: [HACKERS] [pgsql-hackers] Daily digest v1.11023 (17 messages)

2010-08-19 Thread Caleb Welton
From: Tom Lane t...@sss.pgh.pa.usmailto:t...@sss.pgh.pa.us Date: August 19, 2010 10:25:36 AM PDT To: David Fetter da...@fetter.orgmailto:da...@fetter.org Cc: Kevin Grittner kevin.gritt...@wicourts.govmailto:kevin.gritt...@wicourts.gov, Robert Haas

[HACKERS] Old git repo

2010-08-19 Thread Jeff Davis
The new git repository will have different SHA1s for all of the commits, so any old SHA1s will be useless without the old repository. Hopefully nobody used links to specific commits (or SHA1s) pointing to the old git repository for anything important. But I found myself doing so occasionally for

Re: [HACKERS] Old git repo

2010-08-19 Thread Magnus Hagander
On Thu, Aug 19, 2010 at 23:29, Jeff Davis pg...@j-davis.com wrote: The new git repository will have different SHA1s for all of the commits, so any old SHA1s will be useless without the old repository. Hopefully nobody used links to specific commits (or SHA1s) pointing to the old git

Re: [HACKERS] Old git repo

2010-08-19 Thread Christopher Browne
On Thu, Aug 19, 2010 at 5:29 PM, Jeff Davis pg...@j-davis.com wrote: The new git repository will have different SHA1s for all of the commits, so any old SHA1s will be useless without the old repository. Hopefully nobody used links to specific commits (or SHA1s) pointing to the old git

Re: [HACKERS] [BUGS] COPY FROM/TO losing a single byte of a multibyte UTF-8 sequence

2010-08-19 Thread Tom Lane
Steven Schlansker ste...@trumpet.io writes: I'm having a rather annoying problem - a particular string is causing the Postgres COPY functionality to lose a byte, causing data corruption in backups and transferred data. I was able to reproduce this on my own Mac. Some tracing shows that the

Re: [HACKERS] Old git repo

2010-08-19 Thread Jeff Davis
On Thu, 2010-08-19 at 23:30 +0200, Magnus Hagander wrote: It might well be, and the cost is low. But if you're talking about gitweb links or so, they'll still be invalid, because it would have to be renamed to postgresql-old or something like that... Sure, that's fine. It would just be nice

Re: [HACKERS] proposal: tuplestore, tuplesort aggregate functions

2010-08-19 Thread Tom Lane
Kevin Grittner kevin.gritt...@wicourts.gov writes: Robert Haas robertmh...@gmail.com wrote: I suppose there could also be a bit of an ambiguity if you're working with a type like int4 where the values are discrete steps. Like, what do you do with {1, 2}? Hmm, good point. The same thing

Re: [HACKERS] proposal: tuplestore, tuplesort aggregate functions

2010-08-19 Thread David Fetter
On Thu, Aug 19, 2010 at 05:40:46PM -0400, Tom Lane wrote: Kevin Grittner kevin.gritt...@wicourts.gov writes: Robert Haas robertmh...@gmail.com wrote: I suppose there could also be a bit of an ambiguity if you're working with a type like int4 where the values are discrete steps. Like, what

Re: [HACKERS] proposal: tuplestore, tuplesort aggregate functions

2010-08-19 Thread Robert Haas
On Thu, Aug 19, 2010 at 5:53 PM, David Fetter da...@fetter.org wrote: On Thu, Aug 19, 2010 at 05:40:46PM -0400, Tom Lane wrote: Kevin Grittner kevin.gritt...@wicourts.gov writes: Robert Haas robertmh...@gmail.com wrote: I suppose there could also be a bit of an ambiguity if you're working

Re: [HACKERS] [BUGS] COPY FROM/TO losing a single byte of a multibyte UTF-8 sequence

2010-08-19 Thread Tom Lane
Steven Schlansker ste...@trumpet.io writes: On Aug 19, 2010, at 2:35 PM, Tom Lane wrote: I was able to reproduce this on my own Mac. Some tracing shows that the problem is that isspace(0x85) returns true when in locale en_US.utf-8. This causes array_in to drop the final byte of the array

[HACKERS] Avoiding deadlocks ...

2010-08-19 Thread Josh Berkus
Kevin, This one is for you: Two sessions, in transaction: Process A Process B update session where id = X; update order where orderid = 5; update order where orderid = 5; update order where orderid = 5; ... deadlock error. It seems

Re: [HACKERS] Fw: patch for pg_ctl.c to add windows service start-type

2010-08-19 Thread Quan Zongliang
Because Windows's CreateService has serial start-type: SERVICE_AUTO_START SERVICE_BOOT_START SERVICE_DEMAND_START SERVICE_DISABLED SERVICE_SYSTEM_START Although all of them are not useful for pg service. I think it is better to use enum. On Thu, 19 Aug 2010 16:48:53 -0400 Alvaro Herrera

Re: [HACKERS] Fw: patch for pg_ctl.c to add windows service start-type

2010-08-19 Thread Quan Zongliang
I don't know how to edit documents exactly before. Thanks. On Thu, 19 Aug 2010 08:48:53 -0700 David Fetter da...@fetter.org wrote: On Thu, Aug 19, 2010 at 10:24:54PM +0800, Quan Zongliang wrote: documents attached. html and man-page Thanks! For future reference, the way to patch docs

Re: [HACKERS] trace_recovery_messages

2010-08-19 Thread Tom Lane
Fujii Masao masao.fu...@gmail.com writes: The explanation of trace_recovery_messages in the document is inconsistent with the definition of it in guc.c. I've applied a patch for this. I was tempted to propose that we just rip out trace_recovery_messages altogether, but I suppose Simon would

[HACKERS] Re: [BUGS] COPY FROM/TO losing a single byte of a multibyte UTF-8 sequence

2010-08-19 Thread Tatsuo Ishii
We generally assume that in server-safe encodings, the ctype.h functions will behave sanely on any single-byte value. I think this wisedom is only true for C locale. I'm not surprised all that it does not work with non C locales. From array_funcs.c: while (isspace((unsigned

Re: [HACKERS] proposal: tuplestore, tuplesort aggregate functions

2010-08-19 Thread David Fetter
On Thu, Aug 19, 2010 at 06:03:57PM -0400, Robert Haas wrote: On Thu, Aug 19, 2010 at 5:53 PM, David Fetter da...@fetter.org wrote: On Thu, Aug 19, 2010 at 05:40:46PM -0400, Tom Lane wrote: Kevin Grittner kevin.gritt...@wicourts.gov writes: Robert Haas robertmh...@gmail.com wrote: I

[HACKERS] security hook on authorization

2010-08-19 Thread KaiGai Kohei
I also plan to add a security hook on authorization time. It shall allow external security providers to set up credential of the authenticated clients. Please note that it is not intended to control authentication process. It is typically checked based on a pair of username and password. What I

[HACKERS] small smgrcreate cleanup patch

2010-08-19 Thread Robert Haas
smgrcreate() currently contains a call to TablespaceCreateDbspace(). As the comment says, this is a rather silly place to put it. The silliest thing about it, IMHO, is that it forces the following check to be done in both smgrcreate() and mdcreate(): if (isRedo reln-md_fd[forknum] !=

Re: [HACKERS] security hook on authorization

2010-08-19 Thread Robert Haas
2010/8/19 KaiGai Kohei kai...@ak.jp.nec.com: I also plan to add a security hook on authorization time. It shall allow external security providers to set up credential of the authenticated clients. Please note that it is not intended to control authentication process. It is typically checked

Re: [HACKERS] security hook on authorization

2010-08-19 Thread KaiGai Kohei
(2010/08/20 11:45), Robert Haas wrote: 2010/8/19 KaiGai Koheikai...@ak.jp.nec.com: I also plan to add a security hook on authorization time. It shall allow external security providers to set up credential of the authenticated clients. Please note that it is not intended to control