Re: [PATCHES] Relocatable locale

2004-05-24 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > But they all use the app name of "postgres". They always did. > > Oh! Sorry, I'm barking up the wrong tree then. I was thinking you were > looking at the exec_path. Nope, hard-coded, as they all are. I could pull from argv[0], bu

Re: [PATCHES] Relocatable locale

2004-05-24 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > But they all use the app name of "postgres". They always did. Oh! Sorry, I'm barking up the wrong tree then. I was thinking you were looking at the exec_path. regards, tom lane ---(end of broadcast)---

Re: [PATCHES] Relocatable locale

2004-05-24 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > But I added code to path.c to skip that if the app is "postgres". Why > > doesn't that work? > > That will work fine ... for a standalone backend. Not so fine for > postmaster or bootstrap or other cases that go through main.c. But

Re: [PATCHES] Relocatable locale

2004-05-24 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > But I added code to path.c to skip that if the app is "postgres". Why > doesn't that work? That will work fine ... for a standalone backend. Not so fine for postmaster or bootstrap or other cases that go through main.c. regards

Re: [PATCHES] Relocatable locale

2004-05-24 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > I don't understand. I moved it up little in the file, but those calls > > were happening in that file before, just a little lower. > > No, *that* call wasn't happening at all. The calls that were there > were setting certain limited,

Re: [PATCHES] Relocatable locale

2004-05-24 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > I don't understand. I moved it up little in the file, but those calls > were happening in that file before, just a little lower. No, *that* call wasn't happening at all. The calls that were there were setting certain limited, safe LC categories. You ad

Re: [PATCHES] Relocatable locale

2004-05-24 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > Well, as coded now, it will behave the same. > > No it won't: as you have it, the postmaster and everything else that > goes through main.c will execute a setlocale call, which was not there > before for very good reasons. I don't un

Re: [PATCHES] Relocatable locale

2004-05-24 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > Well, as coded now, it will behave the same. No it won't: as you have it, the postmaster and everything else that goes through main.c will execute a setlocale call, which was not there before for very good reasons. regards, tom l

Re: [PATCHES] Relocatable locale

2004-05-24 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > Tom Lane wrote: > >> I don't really believe that path.c has any business doing this at > >> all, in any program. > > > Well, all our client apps used to do it in their own code. Now they > > call set_pglocale to do it centrally and r

Re: [PATCHES] Relocatable locale

2004-05-24 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> I don't really believe that path.c has any business doing this at >> all, in any program. > Well, all our client apps used to do it in their own code. Now they > call set_pglocale to do it centrally and relocabably. I don't care if t

Re: [PATCHES] Relocatable locale

2004-05-24 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > OK, patch applied. Turns out it was only added for the backend > > ("postgres"). > > Hm? Isn't that code going to be executed in postmaster, bootstrap, > checkpoint processes, etc etc? > > I don't really believe that path.c has any

Re: [PATCHES] Relocatable locale

2004-05-24 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > OK, patch applied. Turns out it was only added for the backend > ("postgres"). Hm? Isn't that code going to be executed in postmaster, bootstrap, checkpoint processes, etc etc? I don't really believe that path.c has any business doing this at all, in

Re: [PATCHES] Relocatable locale

2004-05-24 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > I have two questions. First, setlocale() seemed to be inconsistently > > set inside and outside of ENABLE_NLS. I assume the proper location is > > inside. > > Please do *not* go adding setlocale calls that were not there before. > Y

Re: [PATCHES] Relocatable locale

2004-05-24 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > I have two questions. First, setlocale() seemed to be inconsistently > set inside and outside of ENABLE_NLS. I assume the proper location is > inside. Please do *not* go adding setlocale calls that were not there before. You *will* break things. > !

[PATCHES] Relocatable locale

2004-05-24 Thread Bruce Momjian
Magnus found out that LOCALEDIR wasn't being handled in a relocatable manner. This patch fixes that. It also adjusts the get_*_path functions to limit values to MAXPGPATH. I have two questions. First, setlocale() seemed to be inconsistently set inside and outside of ENABLE_NLS. I assume the pr

[PATCHES] Small patch for oracle_compat.c

2004-05-24 Thread Magnus Hagander
limits.h needed in oracle_compat.c to compile on win32. See attached patch. //Magnus <> oracle_compat.patch Description: oracle_compat.patch ---(end of broadcast)--- TIP 8: explain analyze is your friend

Re: [PATCHES] Cancel/Kill backend functions

2004-05-24 Thread Magnus Hagander
Okay, here is an updated patch. now uses IsBackendPid(), which is closely modeled (read cut-and-pasted) from TransactionIdIsInProgress(). Since it's no longer a pgstat function, I moved it to "misc.c". Not 100% that's the right place either, but it seemed like the best alternative. //Magnus >--

[PATCHES] contrib/dbmirror typo fix

2004-05-24 Thread ssinger
Please apply this minor patch to the cvs HEAD of dbmirror It fixes a typo in a define Thanks -- Steven Singer [EMAIL PROTECTED] Dispatch SystemsPhone: 519-747-1170 ext 282 Navtech Systems Support Inc.AFTN: CY

[PATCHES] delayed planning of unnamed statements

2004-05-24 Thread Oliver Jowett
Per discussion on -hackers (http://archives.postgresql.org/pgsql-hackers/2004-05/msg00990.php), here is a first cut at delaying query planning for unnamed statements until we have concrete parameters (i.e. at Bind). This passes 'make check' (not particularly informative since that doesn't exer

Re: [PATCHES] updated list rewrite

2004-05-24 Thread Gaetano Mendola
Neil Conway wrote: I've attached a new version of the list rewrite patch (gzip'ed). Changes since the last patch: I never dig on postgresql code in order to see how and where lists are used, I'm wondering if also a "rope" could be usefull somewhere. Regards Gaetano Mendola ---

Re: [PATCHES] add build utilities in default install

2004-05-24 Thread Bruce Momjian
Fabien COELHO wrote: > > Dear patchers, > > > Subject: [PATCHES] add build utilities in default install > > I withdraw this submission, which was not yet considered for inclusion > anyway. > > I'll send a more complete patch, which includes this one, but also provide > a working infrastructure

Re: [PATCHES] Tuple sampling

2004-05-24 Thread Tom Lane
Manfred Koizar <[EMAIL PROTECTED]> writes: > Performance was not the primary motivation. I found it confusing to > have doubles everywhere and not to know whether a variable is declared > as double, because > . we need the fractional part (e.g. a probability) > . or it should be able to hold a

Re: [PATCHES] Tuple sampling

2004-05-24 Thread Manfred Koizar
On Sun, 23 May 2004 17:32:36 -0400, Tom Lane <[EMAIL PROTECTED]> wrote: >I took out the TupleCount typedef and went >back to using doubles for the tuple counts; this is more consistent with >the coding style used elsewhere, and I really doubt that it's any >slower. Performance was not the primary

Re: [PATCHES] add build utilities in default install

2004-05-24 Thread Fabien COELHO
Dear patchers, > Subject: [PATCHES] add build utilities in default install I withdraw this submission, which was not yet considered for inclusion anyway. I'll send a more complete patch, which includes this one, but also provide a working infrastructure for extensions, sometimes later. I've som