[HACKERS] Javascript support in the backend, i.e. PL/JS

2007-11-16 Thread Sam Mason
Hi All, I've been writing some code[1] to support Javascript in the backend. I've got the basic bits working, the next job for me is implementing SPI support. Currently, it runs simple bits of code like the following: CREATE FUNCTION jsinc(n INTEGER) RETURNS INTEGER LANGUAGE pljs AS $$

Re: [HACKERS] Javascript support in the backend, i.e. PL/JS

2007-11-16 Thread Sam Mason
On Fri, Nov 16, 2007 at 09:20:37AM +0100, Pavel Stehule wrote: On 16/11/2007, Sam Mason [EMAIL PROTECTED] wrote: Hi All, I've been writing some code[1] to support Javascript in the backend. I've got the basic bits working, the next job for me is implementing SPI support. Currently, it

Re: [HACKERS] [COMMITTERS] pgsql: update files for beta3

2007-11-16 Thread Magnus Hagander
On Fri, Nov 16, 2007 at 10:32:13AM +0100, Peter Eisentraut wrote: Am Freitag, 16. November 2007 schrieb Magnus Hagander: Last time it was flex (or was it bison). This time autoconf (which I beleive has happened before as well). It *will* happen again. Just download autoconf, bison, flex

Re: [HACKERS] [COMMITTERS] pgsql: update files for beta3

2007-11-16 Thread Peter Eisentraut
Am Freitag, 16. November 2007 schrieb Marc G. Fournier: I know right now we have three different versions 'required', just can't recall which fall under which ... You just look into the files to see what was used last time. -- Peter Eisentraut http://developer.postgresql.org/~petere/

Re: [HACKERS] [COMMITTERS] pgsql: update files for beta3

2007-11-16 Thread Peter Eisentraut
Am Freitag, 16. November 2007 schrieb Tom Lane: [ digs for a moment... ] According to my notes we are using autoconf 2.53 for versions 7.3-8.0 and 2.59 for the later branches. So 2.13 is already out of the picture. It might be that 2.53 to 2.59 to 2.61 is not all that big a jump in reality,

[HACKERS] Problem with pg_dump -n schemaname

2007-11-16 Thread Zoltan Boszormenyi
Hi, we came across a problem when you want to dump only one schema. The ASCII output when loaded with psql into an empty database doesn't produce an identical schema to the original. The problem comes from this statement ordering: SET ... -- some initial DB parameters ... SET search_path =

Re: [HACKERS] Javascript support in the backend, i.e. PL/JS

2007-11-16 Thread Sam Mason
On Fri, Nov 16, 2007 at 12:05:02PM +0100, Andreas Joseph Krogh wrote: On Friday 16 November 2007 11:29:09 Sam Mason wrote: [snip] SP? Stored Procedure That was kind of obvious wasn't it! I failed to parse that because of the an before it; an stored procedure doesn't make much sense!

Re: [HACKERS] Javascript support in the backend, i.e. PL/JS

2007-11-16 Thread Andreas Joseph Krogh
On Friday 16 November 2007 11:29:09 Sam Mason wrote: [snip] SP? Stored Procedure -- Andreas Joseph Krogh [EMAIL PROTECTED] Senior Software Developer / Manager +-+ OfficeNet AS| The most difficult thing in the world

Re: [HACKERS] Re: [Fwd: PGBuildfarm member narwhal Branch HEAD Status changed from OK to Make failure]

2007-11-16 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thu, 15 Nov 2007 20:48:38 -0500 Tom Lane [EMAIL PROTECTED] wrote: Devrim =?ISO-8859-1?Q?G=DCND=DCZ?= [EMAIL PROTECTED] writes: On Thu, 2007-11-15 at 21:26 -0400, Marc G. Fournier wrote: Any idea on how often narwhal will do a build? It

Re: [HACKERS] AllocSetStats uses fprintf instead of elog

2007-11-16 Thread Tom Lane
Zdenek Kotala [EMAIL PROTECTED] writes: Function AllocSetStats uses fprintf instead of standard logging method. Is there any reason for it? Yes: it's typically called in zero-free-memory situations, and we don't want to depend on elog() succeeding to be able to find out what happened.

Re: [HACKERS] [COMMITTERS] pgsql: update files for beta3

2007-11-16 Thread Peter Eisentraut
Am Freitag, 16. November 2007 schrieb Magnus Hagander: Last time it was flex (or was it bison). This time autoconf (which I beleive has happened before as well). It *will* happen again. Just download autoconf, bison, flex from GNU and do a source install. That should cover the problem. --

[HACKERS] strange tuple from ExecutorRun

2007-11-16 Thread Pavel Stehule
Hello I cannot find my bug. I would to get tuple via ExecutorRun. But it works only with one field in target. With more fields I got last fileld on first position and others fields are null. Can somebody help me? Pavel Stehule postgres=# call print(10,20,30); NOTICE: nargs 3 NOTICE: 30 0

[HACKERS] pg_ctl -t N register ??

2007-11-16 Thread Alvaro Herrera
Hi, I just noticed that the pg_ctl register synopsis was updated to have a -t parameter. This does not seem to make sense to me. Is it correct? Does it do anything? My thinking is that we should just remove the -t from that synopsis. -- Alvaro Herrera Developer,

Re: [HACKERS] Javascript support in the backend, i.e. PL/JS

2007-11-16 Thread Andreas Joseph Krogh
On Friday 16 November 2007 09:10:43 Sam Mason wrote: Hi All, I've been writing some code[1] to support Javascript in the backend. [snip] Wow, this is supercool! Most people, as you probably know, don't like JS as a language 'cause they think of it as a web-browser language with lots of bad

Re: [HACKERS] [COMMITTERS] pgsql: update files for beta3

2007-11-16 Thread Bruce Momjian
Tom Lane wrote: Magnus Hagander [EMAIL PROTECTED] writes: I reiterate my point that I think it'd be good with a dedicated VM to build the snapshots and releases off, that isn't affected by other changes to whatever machine happens to be used. This VM could then be given all the required

Re: [HACKERS] [COMMITTERS] pgsql: update files for beta3

2007-11-16 Thread Marc G. Fournier
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 - --On Friday, November 16, 2007 17:44:52 + Dave Page [EMAIL PROTECTED] wrote: Marc G. Fournier wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 - --On Friday, November 16, 2007 11:10:09 -0500 Tom Lane [EMAIL PROTECTED] wrote:

Re: [HACKERS] [COMMITTERS] pgsql: update files for beta3

2007-11-16 Thread Dave Page
Marc G. Fournier wrote: Maybe the BF members could just run their default autoconf as part of the build if they have one. you lost me on that one ... Tom is hestitant about moving to 6.1 because we don't know what the fall out will be ... since I imagine the fallout would be in the

Re: [HACKERS] [COMMITTERS] pgsql: update files for beta3

2007-11-16 Thread Andrew Dunstan
Magnus Hagander wrote: Tom Lane wrote: Magnus Hagander [EMAIL PROTECTED] writes: I reiterate my point that I think it'd be good with a dedicated VM to build the snapshots and releases off, that isn't affected by other changes to whatever machine happens to be used. This VM could then

Re: [HACKERS] Spinlock backoff algorithm

2007-11-16 Thread Martijn van Oosterhout
On Wed, Nov 14, 2007 at 06:57:18PM -0800, Josh Berkus wrote: The question is, for our most common platforms (like AMD and Intel) is the FPU notably slower/more contended than integer division? I'd the impression that it was, but my knowledge of chip architectures is liable to be out of

[HACKERS] Re: [Fwd: PGBuildfarm member narwhal Branch HEAD Status changed from OK to Make failure]

2007-11-16 Thread Marc G. Fournier
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 - --On Thursday, November 15, 2007 20:23:30 -0500 Bruce Momjian [EMAIL PROTECTED] wrote: Should we wait longer for the buildfarm to become more green? Any idea on how often narwhal will do a build? are we talking 24hr to wait to see if it

Re: [HACKERS] [COMMITTERS] pgsql: update files for beta3

2007-11-16 Thread Magnus Hagander
On Fri, Nov 16, 2007 at 09:04:38AM +0100, Peter Eisentraut wrote: Am Freitag, 16. November 2007 schrieb Tom Lane: [ digs for a moment... ] According to my notes we are using autoconf 2.53 for versions 7.3-8.0 and 2.59 for the later branches. So 2.13 is already out of the picture. It

Re: [HACKERS] [COMMITTERS] pgsql: update files for beta3

2007-11-16 Thread Tom Lane
[EMAIL PROTECTED] (Marc G. Fournier) writes: configure (r1.570 - r1.571) (http://developer.postgresql.org/cvsweb.cgi/pgsql/configure?r1=1.570r2=1.571) It appears that Marc has got autoconf 2.61 installed now, instead of the 2.59 that we've been using for some time. I'm a bit

Re: [HACKERS] [COMMITTERS] pgsql: update files for beta3

2007-11-16 Thread Marc G. Fournier
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 - --On Thursday, November 15, 2007 20:49:04 -0800 Joshua D. Drake [EMAIL PROTECTED] wrote: Marc G. Fournier wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 'k, 2.59 isn't even available in FreeBSD ports anymore, only 2.13 and 2.61, so

Re: [HACKERS] pg_ctl -t N register ??

2007-11-16 Thread Bruce Momjian
Alvaro Herrera wrote: Hi, I just noticed that the pg_ctl register synopsis was updated to have a -t parameter. This does not seem to make sense to me. Is it correct? Does it do anything? My thinking is that we should just remove the -t from that synopsis. Well, Peter added it, but

Re: [HACKERS] Javascript support in the backend, i.e. PL/JS

2007-11-16 Thread Tom Lane
Sam Mason [EMAIL PROTECTED] writes: For SPI, I'm thinking that I'd currently like to attempt some object orientated style interface. ... So running some SQL would probably look something like: for (row in spi.prepare(SELECT 1 AS n).query()) { print(row.n); } What's not apparent to

Re: [HACKERS] [COMMITTERS] pgsql: update files for beta3

2007-11-16 Thread Peter Eisentraut
Magnus Hagander wrote: So let's create a VM for just this? This just moves the problem elsewhere: from use the right autoconf version to use the right VM. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP

Re: [HACKERS] Terminal width for help output

2007-11-16 Thread Bruce Momjian
Joshua D. Drake wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thu, 15 Nov 2007 16:04:46 -0500 Tom Lane [EMAIL PROTECTED] wrote: Peter Eisentraut [EMAIL PROTECTED] writes: Do we care to maintain a maximum width for programs' --help output (and psql's \?)? I think 79

Re: [HACKERS] strange tuple from ExecutorRun

2007-11-16 Thread Tom Lane
[ not directly related to your bug, but... ] Pavel Stehule [EMAIL PROTECTED] writes: result = ExecutorRun(qdesc, ForwardScanDirection, 1L); tuple = ExecMaterializeSlot(result); values = (Datum *) palloc(nargs * sizeof(Datum));

Re: [HACKERS] GiST crash recovery (potential problems?)

2007-11-16 Thread Teodor Sigaev
In GiST, I found that after the crash recovery, NSN and right page link are initialized. We can search all the records in this case but performance may become a little worse because we cannot traverse leaves. It doesn't matter. NSN and rightlink are used only during concurrent access: while

[HACKERS] AllocSetStats uses fprintf instead of elog

2007-11-16 Thread Zdenek Kotala
Function AllocSetStats uses fprintf instead of standard logging method. Is there any reason for it? If not I will rewrite it to use elog(NOTICE,..) instead. Zdenek ---(end of broadcast)--- TIP 9: In versions below 8.0, the

[HACKERS] Call for translations

2007-11-16 Thread Peter Eisentraut
Some of you have already been doing a great job, but I would like to point out that with the upcoming release of PostgreSQL 8.3, it is once again time to update the message translations. We are now near a string freeze, which has traditionally been associated with the first release candidate,

Re: [HACKERS] Javascript support in the backend, i.e. PL/JS

2007-11-16 Thread Pavel Stehule
On 16/11/2007, Sam Mason [EMAIL PROTECTED] wrote: Hi All, I've been writing some code[1] to support Javascript in the backend. I've got the basic bits working, the next job for me is implementing SPI support. Currently, it runs simple bits of code like the following: CREATE FUNCTION

Re: [HACKERS] [COMMITTERS] pgsql: update files for beta3

2007-11-16 Thread Tom Lane
Marc G. Fournier [EMAIL PROTECTED] writes: - --On Friday, November 16, 2007 00:40:31 -0500 Tom Lane [EMAIL PROTECTED] wrote: Perhaps so, but it'd cost us a fair amount of up-front work to verify that we don't break the back branches by updating their configure scripts. Not something I want

Re: [HACKERS] Javascript support in the backend, i.e. PL/JS

2007-11-16 Thread Tom Lane
Sam Mason [EMAIL PROTECTED] writes: On Fri, Nov 16, 2007 at 10:56:55AM -0500, Tom Lane wrote: More generally, I think that the average programmer would rather just not be bothered with all these details; he'd want to write for (row in spi.query(...sql... [, arguments])) { ... OK. Would

Re: [HACKERS] [COMMITTERS] pgsql: update files for beta3

2007-11-16 Thread Marc G. Fournier
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 - --On Friday, November 16, 2007 11:10:09 -0500 Tom Lane [EMAIL PROTECTED] wrote: I'm really not too sure what the functional incompatibilities between versions are, but given the extent of line-by-line diffs I've seen in the output of even

Re: [HACKERS] [COMMITTERS] pgsql: update files for beta3

2007-11-16 Thread Magnus Hagander
Tom Lane wrote: Magnus Hagander [EMAIL PROTECTED] writes: I reiterate my point that I think it'd be good with a dedicated VM to build the snapshots and releases off, that isn't affected by other changes to whatever machine happens to be used. This VM could then be given all the required

Re: [HACKERS] [COMMITTERS] pgsql: update files for beta3

2007-11-16 Thread Dave Page
Marc G. Fournier wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 - --On Friday, November 16, 2007 11:10:09 -0500 Tom Lane [EMAIL PROTECTED] wrote: I'm really not too sure what the functional incompatibilities between versions are, but given the extent of line-by-line diffs I've seen

Re: [HACKERS] [COMMITTERS] pgsql: update files for beta3

2007-11-16 Thread Peter Eisentraut
Dave Page wrote: Maybe the BF members could just run their default autoconf as part of the build if they have one. The problem here isn't really that we require a great testing and staging procedure for introducing new autoconf versions. The issue at hand is strictly that we shouldn't

Re: [HACKERS] Terminal width for help output

2007-11-16 Thread Jonah H. Harris
On Nov 15, 2007 4:56 PM, Alvaro Herrera [EMAIL PROTECTED] wrote: Peter Eisentraut wrote: Do we care to maintain a maximum width for programs' --help output (and psql's \?)? I think 79 characters was once a recommendation (or perhaps 72), but we have a couple of violations either way,

Re: [HACKERS] pg_ctl -t N register ??

2007-11-16 Thread Alvaro Herrera
Bruce Momjian wrote: Alvaro Herrera wrote: Hi, I just noticed that the pg_ctl register synopsis was updated to have a -t parameter. This does not seem to make sense to me. Is it correct? Does it do anything? My thinking is that we should just remove the -t from that synopsis.

Re: [HACKERS] [COMMITTERS] pgsql: update files for beta3

2007-11-16 Thread Marc G. Fournier
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 - --On Friday, November 16, 2007 18:00:26 + Dave Page [EMAIL PROTECTED] wrote: Marc G. Fournier wrote: Maybe the BF members could just run their default autoconf as part of the build if they have one. you lost me on that one ... Tom is

Re: [HACKERS] Javascript support in the backend, i.e. PL/JS

2007-11-16 Thread Sam Mason
On Fri, Nov 16, 2007 at 10:56:55AM -0500, Tom Lane wrote: Sam Mason [EMAIL PROTECTED] writes: For SPI, I'm thinking that I'd currently like to attempt some object orientated style interface. ... So running some SQL would probably look something like: for (row in spi.prepare(SELECT 1

Re: [HACKERS] [pgtranslation-translators] Call for translations

2007-11-16 Thread Alvaro Herrera
Peter Eisentraut wrote: Some of you have already been doing a great job, but I would like to point out that with the upcoming release of PostgreSQL 8.3, it is once again time to update the message translations. We are now near a string freeze, which has traditionally been associated with

Off-Topic: Float point division academia? (was: Re: [HACKERS] Spinlock backoff algorithm)

2007-11-16 Thread Mark Mielke
Martijn van Oosterhout wrote: On Wed, Nov 14, 2007 at 06:57:18PM -0800, Josh Berkus wrote: The question is, for our most common platforms (like AMD and Intel) is the FPU notably slower/more contended than integer division? I'd the impression that it was, but my knowledge of chip

Re: [HACKERS] [COMMITTERS] pgsql: update files for beta3

2007-11-16 Thread Joshua D. Drake
Marc G. Fournier wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 That would be a good idea, and really simply things ... FreeBSD seems to have drop'd off support for all but 2.13 and 2.61 ... If we do that, (I honestly don't know) what happens on versions that are running an older

Re: [HACKERS] [COMMITTERS] pgsql: update files for beta3

2007-11-16 Thread Tom Lane
Andrew Dunstan [EMAIL PROTECTED] writes: We are making a mountain out of a molehill here. We've managed to get this right for years with very little fuss. Why make infrastructure to handle a problem that is at most marginal? I have more pressing concerns that building an autoconf step into

Re: [HACKERS] [COMMITTERS] pgsql: update files for beta3

2007-11-16 Thread Dave Page
Andrew Dunstan wrote: (And I share Tom's concern about version compatibility - the autoconf team don't have a great record on that IIRC.) Thats why I think it might be useful to keep an eye on what does and doesn't work. I agree it's not a major issue though, so if it's non-trivial to

Re: [HACKERS] [COMMITTERS] pgsql: update files for beta3

2007-11-16 Thread Dave Page
Marc G. Fournier wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 - --On Friday, November 16, 2007 18:00:26 + Dave Page [EMAIL PROTECTED] wrote: Marc G. Fournier wrote: Maybe the BF members could just run their default autoconf as part of the build if they have one. you lost me

Re: [HACKERS] [COMMITTERS] pgsql: update files for beta3

2007-11-16 Thread Joshua D. Drake
Tom Lane wrote: Marc G. Fournier [EMAIL PROTECTED] writes: [EMAIL PROTECTED] wrote: I can't commit but I can give access to a 2.59 version... Well, easiest is for Tom to run autoconf 2.59 and commit ... or Bruce ... Locally I've got several autoconf versions installed so that I can

Re: [HACKERS] [COMMITTERS] pgsql: update files for beta3

2007-11-16 Thread Peter Eisentraut
Tom Lane wrote: Bruce's suggestion of somehow checking this in the top Makefile is a possibility, but even better would be if creating configure from configure.in failed outright. We have an AC_PREREQ in there that fails if autoconf is too old, but can we tighten it to also complain if too

Re: [HACKERS] [COMMITTERS] pgsql: update files for beta3

2007-11-16 Thread Andrew Dunstan
Dave Page wrote: Just curious, but isn't that something the buildfarm would be good for? generate/commit a 6.1 version of configure, and see if any of hte buildfarm environments break ... or am I missing something 'post-install' that could be affected? Maybe the BF members could just

Re: [HACKERS] [GENERAL] [pgtranslation-translators] Call for translations

2007-11-16 Thread Peter Eisentraut
Alvaro Herrera wrote: I would like to propose this patch. This avoids an inconsistent message wording, and removes the need to translate a string by duplicate. That's fine by me. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of

Re: [HACKERS] [COMMITTERS] pgsql: update files for beta3

2007-11-16 Thread Tom Lane
Peter Eisentraut [EMAIL PROTECTED] writes: Tom Lane wrote: Bruce's suggestion of somehow checking this in the top Makefile is a possibility, but even better would be if creating configure from configure.in failed outright. We have an AC_PREREQ in there that fails if autoconf is too old, but

Re: [HACKERS] [GENERAL] [pgtranslation-translators] Call for translations

2007-11-16 Thread Alvaro Herrera
Peter Eisentraut wrote: Alvaro Herrera wrote: I would like to propose this patch. This avoids an inconsistent message wording, and removes the need to translate a string by duplicate. That's fine by me. Done. -- Alvaro Herrera

Re: [HACKERS] [COMMITTERS] pgsql: update files for beta3

2007-11-16 Thread Tom Lane
Magnus Hagander [EMAIL PROTECTED] writes: I reiterate my point that I think it'd be good with a dedicated VM to build the snapshots and releases off, that isn't affected by other changes to whatever machine happens to be used. This VM could then be given all the required autoconf versions, and

Re: [HACKERS] Javascript support in the backend, i.e. PL/JS

2007-11-16 Thread Sam Mason
On Fri, Nov 16, 2007 at 09:49:38AM +0100, Andreas Joseph Krogh wrote: Most people, as you probably know, don't like JS as a language 'cause they think of it as a web-browser language with lots of bad side-effects, but that's 'cause they don't know the language, really. Javascript is a very

[HACKERS] [solved] strange tuple from ExecutorRun

2007-11-16 Thread Pavel Stehule
Hello It was my bug :(. I forgot increase resno. Classic situation. When you are search bug, search elsewhere. Regards Pavel Stehule ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [HACKERS] Javascript support in the backend, i.e. PL/JS

2007-11-16 Thread Andreas Joseph Krogh
On Friday 16 November 2007 12:23:26 Sam Mason wrote: On Fri, Nov 16, 2007 at 12:05:02PM +0100, Andreas Joseph Krogh wrote: On Friday 16 November 2007 11:29:09 Sam Mason wrote: [snip] SP? Stored Procedure That was kind of obvious wasn't it! I failed to parse that because of the an