Re: [HACKERS] another plperl bug

2004-11-22 Thread Michael Fuhr
On Mon, Nov 22, 2004 at 03:34:17PM -0500, Tom Lane wrote: > > Thanks for the examples. I extended this into a simple regression test > which I've added to CVS. If anyone would like to add some test cases > for more interesting stuff (triggers and error handling come to mind), > step right up ...

Re: [HACKERS] [JDBC] Strange server error with current 8.0beta driver

2004-11-22 Thread Barry Lind
OK, getting closer. The error happens if in jdbc I reuse PreparedStatement objects to reexecute the same set of queries multiple times. Specifically if I do the following set of queries: Declare cursor Close cursor Declare cursor Close cursor Declare cursor Close cursor Declare cursor Close curs

FW: [HACKERS] [JDBC] Strange server error with current 8.0beta driver

2004-11-22 Thread Barry Lind
I have been unable to come up with a simple test case for this problem (yet). But here is some additional information. Today I setup a 7.4.6 and an 8.0.0beta5 on linux (RH9) and could also reproduce the problem. However there were some new twists. I now sometimes get the following error on 8.0:

Re: [HACKERS] How to check the postgresql version

2004-11-22 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 It's not quite the same, but check out the libpq function PQserverVersion, which returns the version in a standard 6-digit format, which can then be used to easily do numeric comparisons. Look for "sversion" in interfaces/libpq/fe-exec.c and PQserv

Re: [HACKERS] Can postgresql accept mutliple connections in the same

2004-11-22 Thread Dru
Zeugswetter Andreas DAZ SD wrote: I am running of postgresql database servers with generally 30-50 users at a time per server. I have noticed one thing for web based databases that they fail to initialse a pg_connection connection every now and again and return no error message at all.

Re: [Testperf-general] Re: [HACKERS] ExclusiveLock

2004-11-22 Thread Tom Lane
Greg Stark <[EMAIL PROTECTED]> writes: > Once upon a time when you formatted hard drives you actually gave them an > interleave factor for a similar reason. These days you invariably use an > interleave of 1, ie, store the blocks continuously. Whether that's because > controllers have become fast e

Re: [Testperf-general] Re: [HACKERS] ExclusiveLock

2004-11-22 Thread Bruce Momjian
Simon Riggs wrote: > On Mon, 2004-11-22 at 23:37, Greg Stark wrote: > > Simon Riggs <[EMAIL PROTECTED]> writes: > > > > > - Find a way to reduce rotational delay when repeatedly writing last WAL > > > page > > > > > > Currently fsync of WAL requires the disk platter to perform a full > > > rotat

Re: [HACKERS] another plperl bug

2004-11-22 Thread Tom Lane
Michael Fuhr <[EMAIL PROTECTED]> writes: > Here's another test case: a function that doesn't return what it's > supposed to return. Fixed, thanks. regards, tom lane ---(end of broadcast)--- TIP 1: subscribe and unsubscribe c

Re: [HACKERS] Can postgresql accept mutliple connections in the same

2004-11-22 Thread Dru
Neil Conway wrote: On Fri, 2004-11-19 at 17:15 +1300, Dru wrote: Ok rules out that possibility also. Is there any stress testing software for postgresql to find out how and when it breaks? Try contrib/pgbench. The website uses php, the problem could be in the wrapper code for PHP thoug

Re: [HACKERS] patch: plpgsql - access records with rec.(expr)

2004-11-22 Thread Neil Conway
On Mon, 2004-11-22 at 10:06 +, Matt wrote: > This would execute a string and pass back the result? It would evaluate a string as a PL/PgSQL statement (which means you could construct any PL/PgSQL statement dynamically, including access to fields of a RECORD determined at runtime). > > I don't

Re: [Testperf-general] Re: [HACKERS] ExclusiveLock

2004-11-22 Thread Simon Riggs
On Mon, 2004-11-22 at 23:37, Greg Stark wrote: > Simon Riggs <[EMAIL PROTECTED]> writes: > > > - Find a way to reduce rotational delay when repeatedly writing last WAL > > page > > > > Currently fsync of WAL requires the disk platter to perform a full > > rotation to fsync again. One idea is to

Re: [Testperf-general] Re: [HACKERS] ExclusiveLock

2004-11-22 Thread Greg Stark
Simon Riggs <[EMAIL PROTECTED]> writes: > - Find a way to reduce rotational delay when repeatedly writing last WAL > page > > Currently fsync of WAL requires the disk platter to perform a full > rotation to fsync again. One idea is to write the WAL to different > offsets that might reduce the r

Re: [HACKERS] patch: plpgsql - access records with rec.(expr)

2004-11-22 Thread Neil Conway
On Mon, 2004-11-22 at 10:57 -0500, Tom Lane wrote: > I'm confused. How/why is this different from EXECUTE? EVALUATE would take a string and evaluate it as a PL/PgSQL statement; EXECUTE takes a string and executes it as a SQL statement. We've discussed this before (although I may not have called i

Re: [HACKERS] another plperl bug

2004-11-22 Thread Tom Lane
Michael Fuhr <[EMAIL PROTECTED]> writes: > Here's another test case: a function that doesn't return what it's > supposed to return. I was wondering about that --- the code paths that expect an array seemed to be testing the SV type more carefully than those expecting a hash did. Sigh.

Re: [HACKERS] Beta5 now Available

2004-11-22 Thread Gavin M. Roy
It's all peer to peer client type stuff with the exception of the tracker server. Gavin Marc G. Fournier wrote: On Mon, 22 Nov 2004, Thomas Hallgren wrote: Marc G. Fournier wrote: What about the Java version that Gavin had mentioned? Aegus or something like that? http://azureus.sourceforge.net

Re: [HACKERS] Beta5 now Available

2004-11-22 Thread Gavin M. Roy
The problem is it requires a box with X on it. (ie it's not console Java, it's gui java) I don't have a server to run it on right now, but will be readdressing server allocations shortly and may be able to set something up with x/vnc and would be happy to use that as a primary bt seeding site

Re: [HACKERS] another plperl bug

2004-11-22 Thread Michael Fuhr
On Mon, Nov 22, 2004 at 03:34:17PM -0500, Tom Lane wrote: > > Thanks for the examples. I extended this into a simple regression test > which I've added to CVS. If anyone would like to add some test cases > for more interesting stuff (triggers and error handling come to mind), > step right up ...

Re: [Testperf-general] Re: [HACKERS] ExclusiveLock

2004-11-22 Thread Simon Riggs
On Thu, 2004-11-18 at 23:54, Tom Lane wrote: > I don't think so; WAL is inherently a linear log. (Awhile ago there was > some talk of nonlinear log writing to get around the one-commit-per- > disk-revolution syndrome, but the idea basically got rejected as > unworkably complicated.) ...this app

Re: [HACKERS] 64Bit Solaris Compile

2004-11-22 Thread Tom Lane
Rod Taylor <[EMAIL PROTECTED]> writes: > Our local admin tried compiling a 64bit PostgreSQL on Solaris 9 using > the below environment: > ... > export CFLAGS='-m64' In 8.0 you'd want to also export LDFLAGS_SL='-m64' regards, tom lane

Re: [HACKERS] 64Bit Solaris Compile

2004-11-22 Thread Oliver Jowett
Rod Taylor wrote: Our local admin tried compiling a 64bit PostgreSQL on Solaris 9 using the below environment: export PATH=:/usr/bin/sparcv9:/usr/ccs/bin/sparcv9:/usr/sfw/bin/sparcv9:/usr/local/bin/sparcv9:/usr/bin:/usr/local/bin:/usr/sfw/bin:/usr/ccs/bin export LD

Re: [HACKERS] another plperl bug

2004-11-22 Thread Tom Lane
"Andrew Dunstan" <[EMAIL PROTECTED]> writes: > I discovered a further plperl bug last night. If foo() is a SRF and > therefore returns an arrayref, calling select foo() rather than select * > from foo() causes a segfault because this line passes NULL as the argument: > tupdesc = CreateTupleDes

Re: [HACKERS] another plperl bug

2004-11-22 Thread Tom Lane
Michael Fuhr <[EMAIL PROTECTED]> writes: > I ran the following tests on 8.0.0beta5, which I think includes > Tom's latest changes: Thanks for the examples. I extended this into a simple regression test which I've added to CVS. If anyone would like to add some test cases for more interesting stuf

Re: [HACKERS] Test database for new installs?

2004-11-22 Thread Greg Stark
Josh Berkus <[EMAIL PROTECTED]> writes: > Also, for tables where the text key is required in the table, *adding* an > additional INT column as a key is no improvement in performance. Not true. Every table which references the varchar-keyed table needs to have a complete copy of the varchar key.

Re: [HACKERS] Test database for new installs?

2004-11-22 Thread Robert Treat
On Monday 22 November 2004 11:07, Andreas Pflug wrote: > Robert Treat wrote: > > I might have access to one for another book as well if we need it, > > although what I have always thought we should provide is a copy of the > > database generated from the tutorial section of the PostgreSQL > > docum

Re: [HACKERS] Test database for new installs?

2004-11-22 Thread Josh Berkus
Andreas, Andrew, > You might be right for small dbs, but a temperature database will likely > contain millions of rows, if filled in the real world. varchar will > probably make the table several times bigger than needed. Yeah, INT keys are useful for performance reasons. It depends on the tabl

Re: [HACKERS] Beta5 now Available

2004-11-22 Thread Thomas Hallgren
Marc G. Fournier wrote: There is a FreeBSD port of it also but it says "A BitTorrent client written in Java" ... does it work as server too, or, by its nature, are servers == clients in Bittorrent? :) Yes. While you're downloading, others might pick bits and pieces from the segmetns that you've

Re: [HACKERS] Test database for new installs?

2004-11-22 Thread Andrew Dunstan
Josh Berkus said: > Andreas, > >> - Usage of varchar for key column > > And? Varchar is somehow implicitly inferior for keys? > > Watch it ... you're about to hit one of my "abuses of SQL" pet-peeves, > the overuse on INT surrogate keys ... > We will probably find that *everthing* each of us doe

Re: [HACKERS] Test database for new installs?

2004-11-22 Thread Greg Stark
Josh Berkus <[EMAIL PROTECTED]> writes: > > - Usage of varchar for key column > > And? Varchar is somehow implicitly inferior for keys? Yes, it's larger and larger is slower. It's also failure prone when pushed through various levels of applications prone to uppercasing or misparsing whitespac

Re: [HACKERS] Test database for new installs?

2004-11-22 Thread Andreas Pflug
Josh Berkus wrote: Andreas, - Usage of varchar for key column And? Varchar is somehow implicitly inferior for keys? Watch it ... you're about to hit one of my "abuses of SQL" pet-peeves, the overuse on INT surrogate keys ... You might be right for small dbs, but a temperature database will like

[HACKERS] 64Bit Solaris Compile

2004-11-22 Thread Rod Taylor
Our local admin tried compiling a 64bit PostgreSQL on Solaris 9 using the below environment: export PATH=:/usr/bin/sparcv9:/usr/ccs/bin/sparcv9:/usr/sfw/bin/sparcv9:/usr/local/bin/sparcv9:/usr/bin:/usr/local/bin:/usr/sfw/bin:/usr/ccs/bin export LD_LIBRARY_PATH=/us

Re: [HACKERS] Beta5 now Available

2004-11-22 Thread Marc G. Fournier
On Mon, 22 Nov 2004, Thomas Hallgren wrote: Marc G. Fournier wrote: What about the Java version that Gavin had mentioned? Aegus or something like that? http://azureus.sourceforge.net/ There is a FreeBSD port of it also but it says "A BitTorrent client written in Java" ... does it work as server

Re: [HACKERS] Beta5 now Available

2004-11-22 Thread Thomas Hallgren
Marc G. Fournier wrote: What about the Java version that Gavin had mentioned? Aegus or something like that? http://azureus.sourceforge.net/ Regards, Thomas Hallgren ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [HACKERS] Beta5 now Available

2004-11-22 Thread Marc G. Fournier
On Mon, 22 Nov 2004, David Fetter wrote: On Mon, Nov 22, 2004 at 12:49:25PM -0400, Marc G. Fournier wrote: On Mon, 22 Nov 2004, David Fetter wrote: On Sun, Nov 21, 2004 at 11:40:29PM -0400, Marc G. Fournier wrote: Check her out and let me know if there are any problems ... I've changed the mk scrip

Re: [HACKERS] Test database for new installs?

2004-11-22 Thread Josh Berkus
Andreas, > - Usage of varchar for key column And? Varchar is somehow implicitly inferior for keys? Watch it ... you're about to hit one of my "abuses of SQL" pet-peeves, the overuse on INT surrogate keys ... -- Josh Berkus Aglio Database Solutions San Francisco ---(e

Re: [HACKERS] patch: plpgsql - access records with rec.(expr)

2004-11-22 Thread Matt
Hi Tom, > > Does that make any sense? Is it worth the work? Or should we just tell > > anyone who actually needs it (I don't, at present) 'use another PL'? > > I don't really see this going anywhere --- it's contorting the semantics > of plpgsql too much for too little gain. Yup, the last bit

Re: [HACKERS] Error handling in plperl and pltcl

2004-11-22 Thread James William Pye
On Sat, 2004-11-20 at 16:39 -0500, Tom Lane wrote: > You're right. You can *not* expose those as user-callable operations in > a PL language. Consider for example what will happen if the user tries > to roll back to a savepoint that was established outside your function > call, or tries to exit t

Re: [HACKERS] Beta5 now Available

2004-11-22 Thread David Fetter
On Mon, Nov 22, 2004 at 12:49:25PM -0400, Marc G. Fournier wrote: > On Mon, 22 Nov 2004, David Fetter wrote: > > >On Sun, Nov 21, 2004 at 11:40:29PM -0400, Marc G. Fournier wrote: > >> > >>Check her out and let me know if there are any problems ... I've > >>changed the mk script to pull in the bet

Re: [HACKERS] another plperl bug

2004-11-22 Thread Tom Lane
"Andrew Dunstan" <[EMAIL PROTECTED]> writes: > I discovered a further plperl bug last night. If foo() is a SRF and > therefore returns an arrayref, calling select foo() rather than select * > from foo() causes a segfault because this line passes NULL as the argument: > tupdesc = CreateTupleDes

Re: [HACKERS] Beta5 now Available

2004-11-22 Thread Marc G. Fournier
On Mon, 22 Nov 2004, David Fetter wrote: On Sun, Nov 21, 2004 at 11:40:29PM -0400, Marc G. Fournier wrote: Check her out and let me know if there are any problems ... I've changed the mk script to pull in the beta3 man pages that I found in the dev/doc directory ... A much slimmed-down bt.postgresq

Re: [HACKERS] Beta5 now Available

2004-11-22 Thread David Fetter
On Sun, Nov 21, 2004 at 11:40:29PM -0400, Marc G. Fournier wrote: > > Check her out and let me know if there are any problems ... I've > changed the mk script to pull in the beta3 man pages that I found > in the dev/doc directory ... A much slimmed-down bt.postgresql.org is now serving it. :) Ch

Re: [HACKERS] another plperl bug

2004-11-22 Thread Michael Fuhr
On Mon, Nov 22, 2004 at 06:37:46AM -0600, Andrew Dunstan wrote: > > I discovered a further plperl bug last night. If foo() is a SRF and > therefore returns an arrayref, calling select foo() rather than select * > from foo() causes a segfault because this line passes NULL as the argument: > >

Re: [HACKERS] Test database for new installs?

2004-11-22 Thread Andreas Pflug
Robert Treat wrote: I might have access to one for another book as well if we need it, although what I have always thought we should provide is a copy of the database generated from the tutorial section of the PostgreSQL documentation. This is the kind of database design I definitely would *no

Re: [HACKERS] patch: plpgsql - access records with rec.(expr)

2004-11-22 Thread Tom Lane
Matt <[EMAIL PROTECTED]> writes: > Does that make any sense? Is it worth the work? Or should we just tell > anyone who actually needs it (I don't, at present) 'use another PL'? I don't really see this going anywhere --- it's contorting the semantics of plpgsql too much for too little gain. The ty

Re: [HACKERS] patch: plpgsql - access records with rec.(expr)

2004-11-22 Thread Tom Lane
Neil Conway <[EMAIL PROTECTED]> writes: > FYI, one thing I want to implement is an EVALUATE statement in plpgsql > (analogous to eval() in Perl, for example). I'm confused. How/why is this different from EXECUTE? regards, tom lane ---(end of broad

Re: [HACKERS] Test database for new installs?

2004-11-22 Thread Robert Treat
On Friday 19 November 2004 13:54, Joshua D. Drake wrote: > > Hmmm ... sounds like an add-in project.I'm not sure, I think > > something which demonstrates more general principles than the TPC-W > > database would be useful, sort of a "training database".Maybe one of > > the writers of PGSQL

Re: [HACKERS] patch: plpgsql - access records with rec.(expr)

2004-11-22 Thread Matt
Hi, Updated patch (now against beta5) attached. It now pfree's any converted strings, avoids pointlessly casting an int4oid to int4oid, complies to CS (uses tabs, not spaces) and works with label.record.(expression) too. I'm still testing, it now does what I set out to achieve. I haven't done any

Re: [HACKERS] Preventing some SQL commands

2004-11-22 Thread Thomas Hallgren
James William Pye bool (*SPI_UtilityFilter) (NodeTag aStmt); To a "void SPI_FilterUtilities(void *execPlan, SPI_UtilityFilter fp)". Throwing an error if deemed necessary by the pointed to function. After browsing the code a bit more, I realize that the above suggestion is superior to my own. It

[HACKERS] another plperl bug

2004-11-22 Thread Andrew Dunstan
I discovered a further plperl bug last night. If foo() is a SRF and therefore returns an arrayref, calling select foo() rather than select * from foo() causes a segfault because this line passes NULL as the argument: tupdesc = CreateTupleDescCopy(rsinfo->expectedDesc); I am not sure I even k

Re: [HACKERS] patch: plpgsql - access records with rec.(expr)

2004-11-22 Thread Matt
Hi Neil, Thanks for the comments. I've actually got (yet) another version ready to go, which fixes the compile warnings and adds some sanity checks. I'll post it as soon as I've got beta5 downloaded and tried out :) > FYI, one thing I want to implement is an EVALUATE statement in plpgsql > (analo

Re: [HACKERS] patch: plpgsql - access records with rec.(expr)

2004-11-22 Thread Neil Conway
On Thu, 2004-11-18 at 13:18 +, Matt wrote: > I got extremely frustrated with having to create a temp table every time > I wanted to access an arbitrary column from a record plpgsql. FYI, one thing I want to implement is an EVALUATE statement in plpgsql (analogous to eval() in Perl, for example