Re: [pgsql-patches] guid/uuid datatype

2007-01-25 Thread Jim Nasby
On Jan 25, 2007, at 11:13 AM, Peter Eisentraut wrote: I suggest that you read the discussion in the tsearch thread about figuring out how to make contrib modules more attractive. I don't see a reason why uuid has to be in the core, but I do see that there needs to be some centrally organized con

Re: [pgsql-patches] [HACKERS] unprivileged pl install

2007-01-25 Thread Jeremy Drake
On Thu, 25 Jan 2007, Jeremy Drake wrote: > I think that an ALTER LANGUAGE OWNER TO is the proper response to these > things, and unless I hear otherwise I will attempt to add this to my > patch. Here is the patch which adds this. It also allows ALTER LANGUAGE RENAME TO for the owner, which I mis

Re: [pgsql-patches] [HACKERS] unprivileged contrib and pl install

2007-01-25 Thread Jeremy Drake
On Wed, 24 Jan 2007, Jeremy Drake wrote: > On Wed, 24 Jan 2007, Tom Lane wrote: > > > In detail, it'd look something like: > > > > * For an untrusted language: must be superuser to either create or use > > the language (no change from current rules). Ownership of the > > pg_language entry is real

Re: [pgsql-patches] uuid patch 2.0 (8.3devel)

2007-01-25 Thread Peter Eisentraut
Gevik Babakhani wrote: > Hereby the version 2.0 of the uuid datatype patch with modifications If I may make some comments on style: Put your file at the end of the OBJS variable (or in some sort of sensible order). Put your file at the end of the tests (or in some sort of sensible order). Ref

Re: [pgsql-patches] [HACKERS] Win32 WEXITSTATUS too

2007-01-25 Thread Bruce Momjian
Chuck McDevitt wrote: > Win32 exception codes start with a two-bit severity indication. > 00 means "success", so nothing is wrong. > 01 is an "informational" messages. > 10 is a "warning" message. > 11 is an "error". > > That's why the common exception codes you see start with hex C0, as they > ar

[pgsql-patches] uuid patch 2.0 (8.3devel)

2007-01-25 Thread Gevik Babakhani
Folks, Hereby the version 2.0 of the uuid datatype patch with modifications commented by Neil. - the uuid.h has been cleaned. the declarations have been moved to uuid.c - the text_uuid() and varchar_uuid() have been refactored. - all uuid explicit functions are moved to uuid.c and made local.

Re: [pgsql-patches] Getting rid of warnings

2007-01-25 Thread Magnus Hagander
Tom Lane wrote: > Magnus Hagander <[EMAIL PROTECTED]> writes: >> Not sure I understand. >> The header had: >> isort(int4 *a, const int len) >> and the code had >> isort(int4 *a, int len) > > Oh, I see. Yeah, that's inconsistent, though my thought would be to > remove the (rather useless) const de

Re: [pgsql-patches] Getting rid of warnings

2007-01-25 Thread Magnus Hagander
Bruce Momjian wrote: > I need an updated version of this to apply. The suggested changes are > too extensive. I'll try to do this tomorrow. If I get it right, the changes needed are: NULL instead of cast of function ptr, per Peter. Do the const-change in the other direction in contrib/intarray.

Re: [pgsql-patches] Getting rid of warnings

2007-01-25 Thread Bruce Momjian
I need an updated version of this to apply. The suggested changes are too extensive. --- Magnus Hagander wrote: > Attached patch gets rid of most of the remaining warnings on a VC++ > build. Summary is: > * A bunch of place

Re: [pgsql-patches] setlocal to build.bat

2007-01-25 Thread Bruce Momjian
Applied by Neil. --- Magnus Hagander wrote: > This patch adds a setlocal command to the beginning of build.bat. This > is required to deal with buildenv.bat properly, so that PATH (for > example) doesn't expand infintly. > P

Re: [pgsql-patches] setlocal to build.bat

2007-01-25 Thread Neil Conway
On Thu, 2007-01-25 at 16:11 +0100, Magnus Hagander wrote: > This patch adds a setlocal command to the beginning of build.bat. This > is required to deal with buildenv.bat properly, so that PATH (for > example) doesn't expand infintly. Per report from Joachim Wieland. Applied, thanks. -Neil ---

Re: [pgsql-patches] setlocal to build.bat

2007-01-25 Thread Bruce Momjian
Your patch has been added to the PostgreSQL unapplied patches list at: http://momjian.postgresql.org/cgi-bin/pgpatches It will be applied as soon as one of the PostgreSQL committers reviews and approves it. --- Ma

Re: [pgsql-patches] guid/uuid datatype

2007-01-25 Thread Gevik Babakhani
> I thought the consensus was to provide the only atatype initially and > look into providing the generator functions later or via an external > project (pgfoundry or contrib/). This was my understanding too... to include the uuid in the core and let the actual value be generated elsewhere...(cl

Re: [pgsql-patches] guid/uuid datatype

2007-01-25 Thread Joshua D. Drake
>> The MAC-based generator function could also be included in the backend, >> actually: it just needs to take an argument of type "macaddr". It would >> then be up to the user (and/or various pgfoundry and contrib/ modules) >> to find a way to determine the local machine's MAC address, which >> pr

Re: [pgsql-patches] guid/uuid datatype

2007-01-25 Thread Bruce Momjian
Neil Conway wrote: > On Thu, 2007-01-25 at 17:57 +0100, Stefan Kaltenbrunner wrote: > > I thought the consensus was to provide the only atatype initially and > > look into providing the generator functions later or via an external > > project (pgfoundry or contrib/). > > I don't think distributi

Re: [pgsql-patches] guid/uuid datatype

2007-01-25 Thread Joshua D. Drake
Peter Eisentraut wrote: > Gevik Babakhani wrote: >> So.. do we agree for uuid to be included in the core? > > I suggest that you read the discussion in the tsearch thread about > figuring out how to make contrib modules more attractive. I don't see > a reason why uuid has to be in the core, but

Re: [pgsql-patches] guid/uuid datatype

2007-01-25 Thread Neil Conway
On Thu, 2007-01-25 at 17:57 +0100, Stefan Kaltenbrunner wrote: > I thought the consensus was to provide the only atatype initially and > look into providing the generator functions later or via an external > project (pgfoundry or contrib/). I don't think distributing the (portable) generator fun

Re: [pgsql-patches] guid/uuid datatype

2007-01-25 Thread Peter Eisentraut
Gevik Babakhani wrote: > So.. do we agree for uuid to be included in the core? I suggest that you read the discussion in the tsearch thread about figuring out how to make contrib modules more attractive. I don't see a reason why uuid has to be in the core, but I do see that there needs to be s

Re: [pgsql-patches] guid/uuid datatype

2007-01-25 Thread Stefan Kaltenbrunner
Neil Conway wrote: On Sun, 2007-01-21 at 00:17 +0100, Gevik Babakhani wrote: So.. do we agree for uuid to be included in the core? I'd be curious to know the degree to which the proposed patch is consistent with RFC 4122, which AFAIK is the most recent relevant standard. With regard to functi

Re: [pgsql-patches] guid/uuid datatype

2007-01-25 Thread Neil Conway
On Sun, 2007-01-21 at 00:17 +0100, Gevik Babakhani wrote: > So.. do we agree for uuid to be included in the core? I'd be curious to know the degree to which the proposed patch is consistent with RFC 4122, which AFAIK is the most recent relevant standard. With regard to functions for generating UU

Re: [pgsql-patches] Getting rid of warnings

2007-01-25 Thread Tom Lane
Magnus Hagander <[EMAIL PROTECTED]> writes: > Not sure I understand. > The header had: > isort(int4 *a, const int len) > and the code had > isort(int4 *a, int len) Oh, I see. Yeah, that's inconsistent, though my thought would be to remove the (rather useless) const decoration in the header. I be

Re: [pgsql-patches] Getting rid of warnings

2007-01-25 Thread Neil Conway
On Thu, 2007-01-25 at 17:11 +0100, Magnus Hagander wrote: > The header had: > isort(int4 *a, const int len) > and the code had > isort(int4 *a, int len) ISTM that the "const" keyword to an "int" function argument is pointless, so the right fix is to remove the "const" from the declaration in the h

Re: [pgsql-patches] Getting rid of warnings

2007-01-25 Thread Magnus Hagander
On Thu, Jan 25, 2007 at 10:57:29AM -0500, Tom Lane wrote: > Magnus Hagander <[EMAIL PROTECTED]> writes: > > bool > > ! isort(int4 *a, int len) > > { > > bool > > ! isort(int4 *a, const int len) > > { > > If VC thinks that that is required to fix a warning, it's too broken to live. > AFAICS

Re: [pgsql-patches] Getting rid of warnings

2007-01-25 Thread Tom Lane
Magnus Hagander <[EMAIL PROTECTED]> writes: > bool > ! isort(int4 *a, int len) > { > bool > ! isort(int4 *a, const int len) > { If VC thinks that that is required to fix a warning, it's too broken to live. AFAICS what you've got there is a compiler that is being pedantically strict about l

[pgsql-patches] setlocal to build.bat

2007-01-25 Thread Magnus Hagander
This patch adds a setlocal command to the beginning of build.bat. This is required to deal with buildenv.bat properly, so that PATH (for example) doesn't expand infintly. Per report from Joachim Wieland. //Magnus Index: src/tools/msvc/build.bat

Re: [pgsql-patches] pg_dumpall -f option

2007-01-25 Thread Bruce Momjian
Dave Page wrote: > Bruce Momjian wrote: > > Patch applied. Thanks. > > > > Docs updated to mention Win32: > > > > Write the output to the specified file. This is particularly useful > > on Windows because output redirection does not work for child > > processes. > > I d

Re: [pgsql-patches] [HACKERS] Fix for bug in plpython bool type conversion

2007-01-25 Thread Bruce Momjian
I have had to reverse out this patch because Py_RETURN_TRUE is only supported in Python versions >= 2.3, and we support older versions. I did add a comment: * We would like to use Py_RETURN_TRUE and Py_RETURN_FALSE here for * generating SQL from trigger functions, but those are only *

Re: [pgsql-patches] Getting rid of warnings

2007-01-25 Thread Magnus Hagander
On Thu, Jan 25, 2007 at 03:29:50PM +0100, Peter Eisentraut wrote: > Magnus Hagander wrote: > > * NULL function pointer in SSL call cast to the correct pointer type > > Why not write NULL? > > In the alternative, declare the variable to have the right type to begin > with. I went down the path o

Re: [pgsql-patches] Getting rid of warnings

2007-01-25 Thread Peter Eisentraut
Magnus Hagander wrote: > * NULL function pointer in SSL call cast to the correct pointer type Why not write NULL? In the alternative, declare the variable to have the right type to begin with. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broa

[pgsql-patches] Getting rid of warnings

2007-01-25 Thread Magnus Hagander
Attached patch gets rid of most of the remaining warnings on a VC++ build. Summary is: * A bunch of places that had different const specifyer in the header and in the body of the function. (contrib/intarray, src/timezone) * 1.2 and such constants are double and cause warning. Define as floats (

Re: [pgsql-patches] pg_dumpall -f option

2007-01-25 Thread Dave Page
Bruce Momjian wrote: > Patch applied. Thanks. > > Docs updated to mention Win32: > > Write the output to the specified file. This is particularly useful > on Windows because output redirection does not work for child > processes. I didn't say that - I said that I couldn