[HACKERS] 8.2beta1 crash possibly in libpq

2006-10-08 Thread Mark Cave-Ayland
Hi everyone, I'm in the process of generating the Windows installer for the latest PostGIS 1.1.4 release and I'm getting a regression failure in one of libpq applications - the application in question is generating a segfault. Testing so far shows that the regression tests pass without

Re: [HACKERS] 8.2beta1 crash possibly in libpq

2006-10-08 Thread Magnus Hagander
AFAICT the backtrace and server log is indicating that the crash is happening somewhere in libpq. If someone can help me figure out how to load the libpq symbols into MingW's gdb then I can get a better backtrace if required as I can reproduce this 100% of the time. For reference, the

Re: [HACKERS] Checking max_stack_depth automatically

2006-10-08 Thread Magnus Hagander
I have just realized that getrlimit(RLIMIT_STACK) is a pretty widely available syscall --- it's specified by the Single Unix Spec and the man pages claim it works on all the platforms I have handy to check. I propose that we make use of this call where available to prevent people

Re: [HACKERS] PL/pgSQL Todo, better information in errcontext from plpgsql

2006-10-08 Thread Pavel Stehule
Why do you need the OID to know exactly what function something is? What's wrong with schema.function(args)? -- oid is simply unique. I can take source code, args and all without parsing. It's only one difference. I unlike parsing. decibel=# select 'pg_catalog.abstimelt

Re: [HACKERS] Checking max_stack_depth automatically

2006-10-08 Thread Tom Lane
Magnus Hagander [EMAIL PROTECTED] writes: For win32, we set the stacksize in src/backend/Makefile with -Wl,--stack=4194304. So we know at build time what it is, if that helps you... Well, I can just wire that value into get_stack_depth_rlimit, I suppose, but it sounds crocky. There's no way

Re: [HACKERS] Checking max_stack_depth automatically

2006-10-08 Thread Magnus Hagander
For win32, we set the stacksize in src/backend/Makefile with -Wl,--stack=4194304. So we know at build time what it is, if that helps you... Well, I can just wire that value into get_stack_depth_rlimit, I suppose, but it sounds crocky. If we do, we probably move it to a define (which

Re: [HACKERS] Checking max_stack_depth automatically

2006-10-08 Thread Tom Lane
Magnus Hagander [EMAIL PROTECTED] writes: Well, I can just wire that value into get_stack_depth_rlimit, I suppose, but it sounds crocky. If we do, we probably move it to a define (which could just be in the Makefile) so we don't accidenally change one without the other, no? I think we'd

Re: [HACKERS] timestamptz alias

2006-10-08 Thread Jim C. Nasby
On Fri, Oct 06, 2006 at 02:35:55AM -0500, Andrew Dunstan wrote: Jim Nasby wrote: It would be nice to denote types/aliases that are and aren't ANSI. A number are marked in the docs, but it would be good to add the info to that summary table. Right under the table this sentence appears:

Re: [HACKERS] Should there be a charcat?

2006-10-08 Thread Jim C. Nasby
On Fri, Oct 06, 2006 at 04:10:42PM -0400, Tom Lane wrote: Jim C. Nasby [EMAIL PROTECTED] writes: I would think that c || 'x' would result in 'xx', but it doesn't We did it that way up through 7.3, but changed because we concluded the behavior was inconsistent. The

Re: [HACKERS] Checking max_stack_depth automatically

2006-10-08 Thread Tom Lane
Magnus Hagander [EMAIL PROTECTED] writes: For win32, we set the stacksize in src/backend/Makefile with -Wl,--stack=4194304. So we know at build time what it is, if that helps you... Well, I can just wire that value into get_stack_depth_rlimit, I suppose, but it sounds crocky. If we

Re: [HACKERS] [COMMITTERS] pgsql: Add include needed for new getrusage() call.

2006-10-08 Thread Tom Lane
[EMAIL PROTECTED] (Bruce Momjian) writes: Add include needed for new getrusage() call. If that's actually needed, how did the code build before? It's always included sys/resource.h, except possibly on machines without getrusage ... are there any? I was thinking rusagestub was dead code,

Re: [HACKERS] The improvement for psql of 8.2beta1 not

2006-10-08 Thread Bruce Momjian
Yourfriend wrote: According to the release notes of 8.2, the following item should have been implemented, E.1.3.11. psqlhttp://developer.postgresql.org/pgdocs/postgres/app-psql.htmlChanges - Save multi-line statements as a single entry, rather than one line at a time

Re: [HACKERS] [COMMITTERS] pgsql: Add include needed for new

2006-10-08 Thread Bruce Momjian
Tom Lane wrote: [EMAIL PROTECTED] (Bruce Momjian) writes: Add include needed for new getrusage() call. If that's actually needed, how did the code build before? It's always included sys/resource.h, except possibly on machines without getrusage ... are there any? I was thinking rusagestub

Re: [HACKERS] [PATCHES] Use non-deprecated APIs for dynloader/darwin.c

2006-10-08 Thread Tom Lane
Chris Campbell [EMAIL PROTECTED] writes: Mac OS X has included dlopen() and friends etc since Mac OS X 10.3. The attached patch switches to using those APIs in src/backend/port/ dynloader/darwin.c (and passes make check). Looks good, but I don't think we want to abandon OSX 10.2 support

Re: [HACKERS] [COMMITTERS] pgsql: Add include needed for new getrusage() call.

2006-10-08 Thread Tom Lane
Bruce Momjian [EMAIL PROTECTED] writes: For me, 'struct timeval' is coming in via #include libpq/libpq.h, but of course that is _after_ the inclusion of resource.h. Ah, that explains it. Not sure where you see that sys/resource.h was always there. Looking at the CVS diffs I see it added

Re: [HACKERS] [PATCHES] Use non-deprecated APIs for dynloader/darwin.c

2006-10-08 Thread Chris Campbell
On Oct 8, 2006, at 14:29, Tom Lane wrote: Looks good, but I don't think we want to abandon OSX 10.2 support just yet. I'll revise this to use a configure probe for dlopen. Maybe we can abandon Mac OS X 10.2 in 8.3 and later? And not back- port these patches to the 7.x, 8.0, and 8.1

Re: [HACKERS] The improvement for psql of 8.2beta1 not

2006-10-08 Thread Joshua D. Drake
Bruce Momjian wrote: Yourfriend wrote: According to the release notes of 8.2, the following item should have been implemented, E.1.3.11. psqlhttp://developer.postgresql.org/pgdocs/postgres/app-psql.htmlChanges - Save multi-line statements as a single entry, rather than one line

Re: [HACKERS] The improvement for psql of 8.2beta1 not

2006-10-08 Thread Magnus Hagander
The test shows that it's OK under Linux (Slackware), but malfunctioned on Windows XP. Good point. We don't use readline on Win32, but rather the native command-line control, over which we have little control. Does libedit compile under mingw? No. At least, it didn't the last

Re: [HACKERS] continuing daily testing of dbt2 against postgresql

2006-10-08 Thread Mark Wong
Tom Lane wrote: Mark Wong [EMAIL PROTECTED] writes: After over a year of problems (old site http://developer.osdl.org/markw/postgrescvs/) I have resumed producing daily results of dbt-2 against PostgreSQL CVS code with results here: http://dbt.osdl.org/dbt2.html This is good to

Re: [HACKERS] [COMMITTERS] pgsql: Add include needed for new

2006-10-08 Thread Bruce Momjian
Tom Lane wrote: Bruce Momjian [EMAIL PROTECTED] writes: For me, 'struct timeval' is coming in via #include libpq/libpq.h, but of course that is _after_ the inclusion of resource.h. Ah, that explains it. Not sure where you see that sys/resource.h was always there. Looking at the CVS

Re: [HACKERS] continuing daily testing of dbt2 against postgresql

2006-10-08 Thread Mark Wong
Michael Paesold wrote: [EMAIL PROTECTED] wrote: Mark Wong [EMAIL PROTECTED] writes: After over a year of problems (old site http://developer.osdl.org/markw/postgrescvs/) I have resumed producing daily results of dbt-2 against PostgreSQL CVS code with results here:

Re: [HACKERS] [COMMITTERS] pgsql: Add include needed for new getrusage() call.

2006-10-08 Thread Peter Eisentraut
Tom Lane wrote: There's still something pretty strange here, though, because AFAICS configure should have rejected sys/resource.h if it needs sys/time.h. I think it only gives you a warning. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of

Re: [HACKERS] [PATCHES] Use non-deprecated APIs for dynloader/darwin.c

2006-10-08 Thread Tom Lane
Chris Campbell [EMAIL PROTECTED] writes: On Oct 8, 2006, at 14:29, Tom Lane wrote: Looks good, but I don't think we want to abandon OSX 10.2 support just yet. I'll revise this to use a configure probe for dlopen. Maybe we can abandon Mac OS X 10.2 in 8.3 and later? And not back- port these

[HACKERS] Casting to money

2006-10-08 Thread Dave Page
A pgAdmin user has just pointed out that the data editor doesn't work with money columns, apparently because it casts data when inserting/updating it. The docs for money say: The money type stores a currency amount with a fixed fractional precision; see Table 8-3. Input is accepted in a

Re: [HACKERS] Casting to money

2006-10-08 Thread Tom Lane
Dave Page dpage@vale-housing.co.uk writes: select '$123.45'::money ERROR: invalid input syntax for type money: $123.45 select '£123.00'::money ERROR: invalid input syntax for type money: £123.00 So ... what locale are you trying this in? regards, tom lane

Re: [HACKERS] Upgrading a database dump/restore

2006-10-08 Thread Mark Woodward
Mark Woodward [EMAIL PROTECTED] writes: Not to cause any arguments, but this is sort a standard discussion that gets brought up periodically and I was wondering if there has been any softening of the attitudes against an in place upgrade, or movement to not having to dump and restore for

Re: [HACKERS] Upgrading a database dump/restore

2006-10-08 Thread Tom Lane
Mark Woodward [EMAIL PROTECTED] writes: Whenever someone actually writes a pg_upgrade, we'll institute a policy to restrict changes it can't handle. IMHO, *before* any such tool *can* be written, a set of rules must be enacted regulating catalog changes. That one is easy: there are no rules.

[HACKERS] width_bucket function for timestamps

2006-10-08 Thread Jeremy Drake
I just came across this code I wrote about a year ago which implements a function equivilant to width_bucket for timestamps. I wrote this when I was trying to plot some data over time, and I had more points than I needed. This function allowed me to create a pre-determined number of bins to