Re: [HACKERS] compile errors in new PL/Pler

2004-07-05 Thread Marc G. Fournier
On Fri, 2 Jul 2004, Joshua D. Drake wrote:

So we have three choices as I see it:
1) revert the change
2) require some minimally recent version of perl
3) fix the issue in place
Preferences?
Joshua/Andrew -- do you want to take a shot at making this work on perl 
5.00503?
I personally don't have any desire to make this work on a version of perl 
that the perl community itself suggests that you should upgrade.
Well, backing it out is always an option, since the old version apparently 
did work *shrug*

Personally, rather have the new on in there though ... :)

Marc G. Fournier   Hub.Org Networking Services (http://www.hub.org)
Email: [EMAIL PROTECTED]   Yahoo!: yscrappy  ICQ: 7615664
---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?
  http://www.postgresql.org/docs/faqs/FAQ.html


Re: [HACKERS] compile errors in new PL/Pler

2004-07-02 Thread Andrew Dunstan
Joe Conway said:
 Marc G. Fournier wrote:
 On Fri, 2 Jul 2004, Christopher Kings-Lynne wrote:

 I am going to bet dollars to donuts that it is your perl version.
 Perl 5.00503 is ancient. Try upgrading to at least 5.6.

 Not much I can do about that - it's builtin as part of FreeBSD 4.x
 series.

 And I bet its still the 'standard' for alot of ppl out there running
 it  ... its only within the past couple of months that we've even
 upgraded  mail.postgresql.org to it, and only because I wanted to see
 if it would  improve majordomo's performance (which it didn't) ...

 So we have three choices as I see it:
 1) revert the change
 2) require some minimally recent version of perl
 3) fix the issue in place

 Preferences?

 Joshua/Andrew -- do you want to take a shot at making this work on perl
  5.00503?

 Joe


1 is not acceptable, and 2 kinda sucks.

Please try adding this to SPI.xs,

#ifndef aTHX_
#define aTHX_
#endif

recompile and test by calling spi_exec_query with more than 2 arguments like
this:

create function should_croak() returns text language plperl as $$
  my $rv = spi_exec_query(select 1,5,blurfl);
  return $rv-{status};
$$;

select should_croak();

cheers

andrew





---(end of broadcast)---
TIP 8: explain analyze is your friend


Re: [HACKERS] compile errors in new PL/Pler

2004-07-02 Thread Christopher Kings-Lynne

1 is not acceptable, and 2 kinda sucks.
Please try adding this to SPI.xs,
#ifndef aTHX_
#define aTHX_
#endif
recompile and test by calling spi_exec_query with more than 2 arguments like
this:
Hmmm, compiled fine, but then I get this:
-bash-2.05b$ createlang -d test plperl
ERROR:  could not load library 
/home/chriskl/local/lib/postgresql/plperl.so: dlopen 
'/home/chriskl/local/lib/postgresql/plperl.so' failed. 
(/home/chriskl/local/lib/postgresql/plperl.so: Undefined symbol eval_pv)
createlang: language installation failed: ERROR:  could not load library 
/home/chriskl/local/lib/postgresql/plperl.so: dlopen 
'/home/chriskl/local/lib/postgresql/plperl.so' failed. 
(/home/chriskl/local/lib/postgresql/plperl.so: Undefined symbol eval_pv)

Chris
---(end of broadcast)---
TIP 8: explain analyze is your friend


Re: [HACKERS] compile errors in new PL/Pler

2004-07-02 Thread Andrew Dunstan
Christopher Kings-Lynne said:

 1 is not acceptable, and 2 kinda sucks.

 Please try adding this to SPI.xs,

 #ifndef aTHX_
 #define aTHX_
 #endif

 recompile and test by calling spi_exec_query with more than 2
 arguments like this:

 Hmmm, compiled fine, but then I get this:

 -bash-2.05b$ createlang -d test plperl
 ERROR:  could not load library
 /home/chriskl/local/lib/postgresql/plperl.so: dlopen
 '/home/chriskl/local/lib/postgresql/plperl.so' failed.
 (/home/chriskl/local/lib/postgresql/plperl.so: Undefined symbol
 eval_pv) createlang: language installation failed: ERROR:  could not
 load library  /home/chriskl/local/lib/postgresql/plperl.so: dlopen
 '/home/chriskl/local/lib/postgresql/plperl.so' failed.
 (/home/chriskl/local/lib/postgresql/plperl.so: Undefined symbol
 eval_pv)



progress is good 

We seem to have a mixture of old-style and new-style calls which needs to be
cleaned up. I would relly appreciate some experienced eyes being cast over
this, if there are any around.

In the meantime, does this solve your problem?:

#ifndef eval_pv
#define eval_pv perl_eval_pv
#endif

cheers

andrew



---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
  joining column's datatypes do not match


Re: [HACKERS] compile errors in new PL/Pler

2004-07-02 Thread Abhijit Menon-Sen
At 2004-07-02 08:55:56 -0400, [EMAIL PROTECTED] wrote:

 In the meantime, does this solve your problem?:
 
 #ifndef eval_pv
 #define eval_pv perl_eval_pv
 #endif

The right way to do this is to #include ppport.h from Devel::PPPort.

-- ams

---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings


Re: [HACKERS] compile errors in new PL/Pler

2004-07-02 Thread Tom Lane
Christopher Kings-Lynne [EMAIL PROTECTED] writes:
 I am going to bet dollars to donuts that it is your perl version. Perl 
 5.00503 is ancient. Try upgrading to at least 5.6.

 Not much I can do about that - it's builtin as part of FreeBSD 4.x series.

Chris isn't the only one who's going to insist on fixing this ;-)

$ perl -v
This is perl, version 5.005_03 built for PA-RISC2.0

regards, tom lane

---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
  joining column's datatypes do not match


Re: [HACKERS] compile errors in new PL/Pler

2004-07-02 Thread Larry Rosenman
On Fri, 2 Jul 2004, Tom Lane wrote:
Christopher Kings-Lynne [EMAIL PROTECTED] writes:
I am going to bet dollars to donuts that it is your perl version. Perl
5.00503 is ancient. Try upgrading to at least 5.6.

Not much I can do about that - it's builtin as part of FreeBSD 4.x series.
Chris isn't the only one who's going to insist on fixing this ;-)
$ perl -v
This is perl, version 5.005_03 built for PA-RISC2.0
And on FreeBSD 4.x, you can force use of the perl 5.[68] ports by installing
one of them, and then issuing:
use.perl port
from a root shell.
(It won't help Tom, but will on FreeBSD. )
LER
--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: [EMAIL PROTECTED]
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749
---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings


Re: [HACKERS] compile errors in new PL/Pler

2004-07-02 Thread Christopher Kings-Lynne
In the meantime, does this solve your problem?:
#ifndef eval_pv
#define eval_pv perl_eval_pv
#endif
Hmmm, I put it in  there and rebuilt and reinstalled and tried again:
-bash-2.05b$ createlang -d test plperl
ERROR:  could not load library 
/home/chriskl/local/lib/postgresql/plperl.so: dlopen 
'/home/chriskl/local/lib/postgresql/plperl.so' failed. 
(/home/chriskl/local/lib/postgresql/plperl.so: Undefined symbol eval_pv)
createlang: language installation failed: ERROR:  could not load library 
/home/chriskl/local/lib/postgresql/plperl.so: dlopen 
'/home/chriskl/local/lib/postgresql/plperl.so' failed. 
(/home/chriskl/local/lib/postgresql/plperl.so: Undefined symbol eval_pv)

Same error?  I wonder if I did something wrong...
Chris
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


Re: [HACKERS] compile errors in new PL/Pler

2004-07-02 Thread Andrew Dunstan
Larry Rosenman said:
 On Fri, 2 Jul 2004, Tom Lane wrote:

 Christopher Kings-Lynne [EMAIL PROTECTED] writes:
 I am going to bet dollars to donuts that it is your perl version.
 Perl 5.00503 is ancient. Try upgrading to at least 5.6.

 Not much I can do about that - it's builtin as part of FreeBSD 4.x
 series.

 Chris isn't the only one who's going to insist on fixing this ;-)

 $ perl -v
 This is perl, version 5.005_03 built for PA-RISC2.0

 And on FreeBSD 4.x, you can force use of the perl 5.[68] ports by
 installing one of them, and then issuing:

 use.perl port

 from a root shell.

 (It won't help Tom, but will on FreeBSD. )


We will fix this, and we won't require this upgrade, I believe.

cheers

andrew



---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly


Re: [HACKERS] compile errors in new PL/Pler

2004-07-02 Thread Christopher Kings-Lynne
We seem to have a mixture of old-style and new-style calls which needs to be
cleaned up. I would relly appreciate some experienced eyes being cast over
this, if there are any around.
In the meantime, does this solve your problem?:
I went back to clean CVS and I noticed I had these warnings:
gcc -O2 -fno-strict-aliasing -fpic -DPIC -I. 
-I/usr/libdata/perl/5.00503/mach/CORE -I../../../src/include   -c -o 
plperl.o plperl.c -MMD
plperl.c: In function `plperl_get_keys':
plperl.c:417: warning: passing arg 3 of `Perl_av_store' makes pointer 
from integer without a cast
plperl.c: In function `plperl_get_elem':
plperl.c:452: warning: passing arg 2 of `Perl_hv_exists_ent' makes 
pointer from integer without a cast
plperl.c: In function `plperl_func_handler':
plperl.c:930: warning: passing arg 3 of `Perl_av_store' makes pointer 
from integer without a cast

Chris
---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings


Re: [HACKERS] compile errors in new PL/Pler

2004-07-02 Thread Marc G. Fournier
On Fri, 2 Jul 2004, Larry Rosenman wrote:
On Fri, 2 Jul 2004, Tom Lane wrote:
Christopher Kings-Lynne [EMAIL PROTECTED] writes:
I am going to bet dollars to donuts that it is your perl version. Perl
5.00503 is ancient. Try upgrading to at least 5.6.

Not much I can do about that - it's builtin as part of FreeBSD 4.x 
series.
Chris isn't the only one who's going to insist on fixing this ;-)
$ perl -v
This is perl, version 5.005_03 built for PA-RISC2.0
And on FreeBSD 4.x, you can force use of the perl 5.[68] ports by installing
one of them, and then issuing:
use.perl port
from a root shell.
(It won't help Tom, but will on FreeBSD. )
On a *reasonably* established FreeBSD box, that makes heavy use of perl 
(ie. has *alot* of modules installed), I find that installing the port can 
be a bit of a hardship ... on new machines, its something that I do 
automatically, but it isn't a solution for older boxes, IMHO ...


Marc G. Fournier   Hub.Org Networking Services (http://www.hub.org)
Email: [EMAIL PROTECTED]   Yahoo!: yscrappy  ICQ: 7615664
---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
 subscribe-nomail command to [EMAIL PROTECTED] so that your
 message can get through to the mailing list cleanly


Re: [HACKERS] compile errors in new PL/Pler

2004-07-02 Thread Andrew Dunstan
Christopher Kings-Lynne said:
 We seem to have a mixture of old-style and new-style calls which needs
 to be cleaned up. I would relly appreciate some experienced eyes being
 cast over this, if there are any around.

 In the meantime, does this solve your problem?:

 I went back to clean CVS and I noticed I had these warnings:

 gcc -O2 -fno-strict-aliasing -fpic -DPIC -I.
 -I/usr/libdata/perl/5.00503/mach/CORE -I../../../src/include   -c -o
 plperl.o plperl.c -MMD
 plperl.c: In function `plperl_get_keys':
 plperl.c:417: warning: passing arg 3 of `Perl_av_store' makes pointer
 from integer without a cast
 plperl.c: In function `plperl_get_elem':
 plperl.c:452: warning: passing arg 2 of `Perl_hv_exists_ent' makes
 pointer from integer without a cast
 plperl.c: In function `plperl_func_handler':
 plperl.c:930: warning: passing arg 3 of `Perl_av_store' makes pointer
 from integer without a cast


I suspect it's the same problem, i.e. it doesn't know about eval_pv

Please see if the patch I just sent to -patches works for all these problems.

thanks

andrew



---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
  joining column's datatypes do not match


Re: [HACKERS] compile errors in new PL/Pler

2004-07-02 Thread Joshua D. Drake

So we have three choices as I see it:
1) revert the change
2) require some minimally recent version of perl
3) fix the issue in place
Preferences?
Joshua/Andrew -- do you want to take a shot at making this work on perl 
5.00503?
I personally don't have any desire to make this work on a version of 
perl that the perl community itself suggests that you should upgrade.

Perl 5.00503 is RedHat 6.2 genre... That is scary old.
I believe even RedHat 7.3 came with Perl 5.6 and that is old as well.
Sincerely,
Joshua D. Drake

Joe

--
Command Prompt, Inc., home of Mammoth PostgreSQL - S/ODBC and S/JDBC
Postgresql support, programming shared hosting and dedicated hosting.
+1-503-667-4564 - [EMAIL PROTECTED] - http://www.commandprompt.com
Mammoth PostgreSQL Replicator. Integrated Replication for PostgreSQL
begin:vcard
fn:Joshua D. Drake
n:Drake;Joshua D.
org:Command Prompt, Inc.
adr:;;PO Box 215;Cascade Locks;Oregon;97014;USA
email;internet:[EMAIL PROTECTED]
title:Consultant
tel;work:503-667-4564
tel;fax:503-210-0034
note:Command Prompt, Inc. is the largest and oldest US based commercial PostgreSQL support provider. We  provide the only commercially viable integrated PostgreSQL replication solution, but also custom programming, and support. We authored  the book Practical PostgreSQL, the procedural language plPHP, and adding trigger capability to plPerl.
x-mozilla-html:FALSE
url:http://www.commandprompt.com/
version:2.1
end:vcard


---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faqs/FAQ.html


Re: [HACKERS] compile errors in new PL/Pler

2004-07-02 Thread Andrew Dunstan
Joshua D. Drake said:

 So we have three choices as I see it:
 1) revert the change
 2) require some minimally recent version of perl
 3) fix the issue in place

 Preferences?

 Joshua/Andrew -- do you want to take a shot at making this work on
 perl  5.00503?

 I personally don't have any desire to make this work on a version of
 perl that the perl community itself suggests that you should upgrade.

 Perl 5.00503 is RedHat 6.2 genre... That is scary old.

 I believe even RedHat 7.3 came with Perl 5.6 and that is old as well.


I have my fingers crossed that the patch I sent in with an upgraded ppport.h
(which is supposed to handle these issues) will fix the matter. It was
simply generated with this command:

perl -MDevel::PPPort -e 'Devel::PPPort::WriteFile();'

I would like to support as wide a user base as is reasonably possible. If
this doesn't work we could restrict support to some version, but that would
be a fallback. Certainly, we should not let it get to the stage of
compile/link errors.

cheers

andrew



---(end of broadcast)---
TIP 8: explain analyze is your friend


[HACKERS] compile errors in new PL/Pler

2004-07-01 Thread Christopher Kings-Lynne
gmake[3]: Entering directory `/space/1/home/chriskl/pgsql/src/pl/plperl'
gcc -O2 -fno-strict-aliasing -g -fpic -DPIC -I. 
-I/usr/libdata/perl/5.00503/mach/CORE -I../../../src/include   -c -o 
SPI.o SPI.c -MMD
SPI.xs: In function `XS__spi_exec_query':
SPI.xs:51: `aTHX_' undeclared (first use in this function)
SPI.xs:51: (Each undeclared identifier is reported only once
SPI.xs:51: for each function it appears in.)
SPI.xs:51: syntax error before string constant
gmake[3]: *** [SPI.o] Error 1
gmake[3]: Leaving directory `/space/1/home/chriskl/pgsql/src/pl/plperl'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/space/1/home/chriskl/pgsql/src/pl'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/space/1/home/chriskl/pgsql/src'
gmake: *** [all] Error 2

Chris
---(end of broadcast)---
TIP 8: explain analyze is your friend


Re: [HACKERS] compile errors in new PL/Pler

2004-07-01 Thread Joshua D. Drake
Christopher Kings-Lynne wrote:
gmake[3]: Entering directory `/space/1/home/chriskl/pgsql/src/pl/plperl'
gcc -O2 -fno-strict-aliasing -g -fpic -DPIC -I. 
-I/usr/libdata/perl/5.00503/mach/CORE -I../../../src/include   -c -o 
SPI.o SPI.c -MMD

I am going to bet dollars to donuts that it is your perl version. Perl 
5.00503 is ancient. Try upgrading to at least 5.6.

Sincerely,
Joshua D. Drake

SPI.xs: In function `XS__spi_exec_query':
SPI.xs:51: `aTHX_' undeclared (first use in this function)
SPI.xs:51: (Each undeclared identifier is reported only once
SPI.xs:51: for each function it appears in.)
SPI.xs:51: syntax error before string constant
gmake[3]: *** [SPI.o] Error 1
gmake[3]: Leaving directory `/space/1/home/chriskl/pgsql/src/pl/plperl'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/space/1/home/chriskl/pgsql/src/pl'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/space/1/home/chriskl/pgsql/src'
gmake: *** [all] Error 2
Chris
---(end of broadcast)---
TIP 8: explain analyze is your friend

--
Command Prompt, Inc., home of Mammoth PostgreSQL - S/ODBC and S/JDBC
Postgresql support, programming shared hosting and dedicated hosting.
+1-503-667-4564 - [EMAIL PROTECTED] - http://www.commandprompt.com
PostgreSQL Replicator -- production quality replication for PostgreSQL
---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings


Re: [HACKERS] compile errors in new PL/Pler

2004-07-01 Thread Christopher Kings-Lynne
gmake[3]: Entering directory `/space/1/home/chriskl/pgsql/src/pl/plperl'
gcc -O2 -fno-strict-aliasing -g -fpic -DPIC -I. 
-I/usr/libdata/perl/5.00503/mach/CORE -I../../../src/include   -c -o 
SPI.o SPI.c -MMD

I am going to bet dollars to donuts that it is your perl version. Perl 
5.00503 is ancient. Try upgrading to at least 5.6.
Not much I can do about that - it's builtin as part of FreeBSD 4.x series.
Chris
---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
 joining column's datatypes do not match


Re: [HACKERS] compile errors in new PL/Pler

2004-07-01 Thread Marc G. Fournier
On Fri, 2 Jul 2004, Christopher Kings-Lynne wrote:
gmake[3]: Entering directory `/space/1/home/chriskl/pgsql/src/pl/plperl'
gcc -O2 -fno-strict-aliasing -g -fpic -DPIC -I. 
-I/usr/libdata/perl/5.00503/mach/CORE -I../../../src/include   -c -o 
SPI.o SPI.c -MMD

I am going to bet dollars to donuts that it is your perl version. Perl 
5.00503 is ancient. Try upgrading to at least 5.6.
Not much I can do about that - it's builtin as part of FreeBSD 4.x series.
And I bet its still the 'standard' for alot of ppl out there running it 
... its only within the past couple of months that we've even upgraded 
mail.postgresql.org to it, and only because I wanted to see if it would 
improve majordomo's performance (which it didn't) ...


Marc G. Fournier   Hub.Org Networking Services (http://www.hub.org)
Email: [EMAIL PROTECTED]   Yahoo!: yscrappy  ICQ: 7615664
---(end of broadcast)---
TIP 6: Have you searched our list archives?
  http://archives.postgresql.org


Re: [HACKERS] compile errors in new PL/Pler

2004-07-01 Thread Joe Conway
Marc G. Fournier wrote:
On Fri, 2 Jul 2004, Christopher Kings-Lynne wrote:
I am going to bet dollars to donuts that it is your perl version. 
Perl 5.00503 is ancient. Try upgrading to at least 5.6.
Not much I can do about that - it's builtin as part of FreeBSD 4.x 
series.
And I bet its still the 'standard' for alot of ppl out there running it 
... its only within the past couple of months that we've even upgraded 
mail.postgresql.org to it, and only because I wanted to see if it would 
improve majordomo's performance (which it didn't) ...
So we have three choices as I see it:
1) revert the change
2) require some minimally recent version of perl
3) fix the issue in place
Preferences?
Joshua/Andrew -- do you want to take a shot at making this work on perl 
5.00503?

Joe
---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
 subscribe-nomail command to [EMAIL PROTECTED] so that your
 message can get through to the mailing list cleanly