agora inbox for pljava-dev@postgresql.org  
help / color / mirror / Atom feed
[Pljava-dev] FYI: pljava-1.0.0b5 on Mac OS X 10.3.6
2+ messages / 0 participants
[nested] [flat]

* [Pljava-dev] FYI: pljava-1.0.0b5 on Mac OS X 10.3.6
@ 2004-11-12 09:05 
  2004-11-12 16:48 ` [Pljava-dev] Re: FYI: pljava-1.0.0b5 on Mac OS X 10.3.6 
  0 siblings, 1 reply; 2+ messages in thread

From:  @ 2004-11-12 09:05 UTC (permalink / raw)

Now compiles and runs without problem (at least the Test)

To compile
	expand pljava archive alongside you postgresql folder
in Terminal.app
	cd to the enclosing folder of pljava and posgresql
	ln -s postgresql-x.y.z pgsql
	cd pljava-xyz
# JAVA_HOME has to be defined as /usr
	export JAVA_HOME=/usr # assuming you are in bash (default under 
Panther)
	make
	sudo make install
	make test_all # make alone doesn't build test ?
# pljava jar's have to be installed in /Library/Java/Extensions
# this step should be added to the make install process ?
	sudo cp ./build/*.jar /Library/Java/Extensions/
# if you have a previous installed version you have to drop sqlj schema 
first (this is missing in the doc)
	psql template1 # assuming local user has access to template1 according 
to pg_hba.conf
		psql> drop schema sqlj cascade
		psql> \q
# then proceed to normal installation
	java org.postgresql.pljava.deploy.Deployer -install -database 
YOURTESTDB
	psql YOURTESTDB
		psql> SELECT 
sqlj.install_jar('file:///LibraryJava/Extensions/examples.jar', 
'samples', true);
		psql> \q
	java org.postgresql.pljava.test.Tester -database YOURTESTDB
54 + 2 = 56
nullOnEven(1) = 1
nullOnEven(2) = null
Name = "nothing", username = "thomas"
Name = "null", username = "pascal"
Name = "empty string", username = ""
Name = "space", username = " "
Name = "tab", username = "      "
Name = "name", username = "name"
Doing 800 updates with double triggers that leak statements
(but not leak memory). One trigger executes SQL that reenters PL/Java
Id = "1", idesc = "first", moddate = "2004-11-11 22:23:44.631717"
Id = "2", idesc = "second", moddate = "2004-11-11 22:23:44.634155"
Id = "3", idesc = "third", moddate = "2004-11-11 22:23:44.636938"
Id = "4", idesc = "first", moddate = "2004-11-11 22:23:45.404"
Id = "5", idesc = "second", moddate = "2004-11-11 22:23:45.414"
Id = "6", idesc = "third", moddate = "2004-11-11 22:23:45.422"
Id = "3", name = "Rebecka Shawn", salary = "30000"
Id = "4", name = "Priscilla Johnson", salary = "25000"
Base = "1", incbase = "6", ctime = "2004-11-11 22:23:45.04"
Base = "1", incbase = "1", ctime = "2004-11-11 22:23:45.056"
Base = "1", incbase = "6", ctime = "2004-11-11 22:23:45.058"
Base = "1", incbase = "11", ctime = "2004-11-11 22:23:45.058"
Base = "1", incbase = "16", ctime = "2004-11-11 22:23:45.058"
Base = "1", incbase = "21", ctime = "2004-11-11 22:23:45.058"
Base = "1", incbase = "26", ctime = "2004-11-11 22:23:45.058"
Base = "1", incbase = "31", ctime = "2004-11-11 22:23:45.058"
Base = "1", incbase = "36", ctime = "2004-11-11 22:23:45.058"
Base = "1", incbase = "41", ctime = "2004-11-11 22:23:45.058"
Base = "1", incbase = "46", ctime = "2004-11-11 22:23:45.058"
Base = "1", incbase = "51", ctime = "2004-11-11 22:23:45.058"
Base = "1", incbase = "56", ctime = "2004-11-11 22:23:45.06"
Max = "10"

Further testing in progress.

Pascal Pochet
p3consulting at mac.com
----------------------------------
PGP
KeyID: 0x208C5DBF
Fingerprint: 9BFB 245C 5BFE 7F1D 64B7  C473 ABB3 4E83 208C 5DBF
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2369 bytes
Desc: not available
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20041112/a3af6de9/attachment.bin;



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* [Pljava-dev] Re: FYI: pljava-1.0.0b5 on Mac OS X 10.3.6
  2004-11-12 09:05 [Pljava-dev] FYI: pljava-1.0.0b5 on Mac OS X 10.3.6 
@ 2004-11-12 16:48 ` 
  0 siblings, 0 replies; 2+ messages in thread

From:  @ 2004-11-12 16:48 UTC (permalink / raw)

p3consulting wrote:
> Now compiles and runs without problem (at least the Test)
> 
Hey, that's great news! Thanks!

> # pljava jar's have to be installed in /Library/Java/Extensions
> # this step should be added to the make install process ?
>     sudo cp ./build/*.jar /Library/Java/Extensions/
 >
Hmm, is this really necessary? Wouldn't that make the jars globally 
visible to the Java system classloader?

There are 3 categories of jar files:
1. The pljava.jar. This is the gut of the backend implementation and 
should be reachable by defining the following in the postgresql.conf file:

   custom_variable_classes = 'pljava'
   pljava.classpath = '<absolut path to the pljava.jar>'

2. Jar files intended to be loaded using sqlj.install_jar. They can 
reside anywhere as long as they are reachable using an URL. They should 
never be reachable using the Java system class loader.

3. The deploy.jar. Only needed when pljava is installed or dropped. This 
type of file needs to be visible as a client program only. Same goes for 
the test.jar and the PostgreSQL client jdbc driver. They should never be 
reachable from the backend.

> # if you have a previous installed version you have to drop sqlj schema 
> first (this is missing in the doc)
 >
Running the deployer with -reinstall or -uninstall should work. I 
believe that's mentioned in the doc. If the -install was unsuccesfull, 
the -uninstall will print a warning but it will still drop the schema.

> # then proceed to normal installation
>     java org.postgresql.pljava.deploy.Deployer -install -database 
 >
I'm planning on shipping a shell script for this where the classpath 
will be defined (must find the jdbc driver and the deploy.jar). As I 
said, making them globally visible is not ideal.

I've made some fairly recent changes to the Makefile system in order to 
use the new pgxs concept. It's in the CVS HEAD. Feel free to try it out. 
It would be nice if any Max OS X problems could be found before it's 
time for the next release.

Again, thanks for your help.

Regards,
Thomas Hallgren





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2004-11-12 16:48 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-11-12 09:05 [Pljava-dev] FYI: pljava-1.0.0b5 on Mac OS X 10.3.6 
2004-11-12 16:48 ` 

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox