From scaekenberghe at common-lisp.net Tue Mar 18 14:19:30 2008 From: scaekenberghe at common-lisp.net (Sven Van Caekenberghe) Date: Tue, 18 Mar 2008 15:19:30 +0100 Subject: [pg-devel] Portability to LispWorks Message-ID: <3C50371C-EC52-4FA6-8100-E1346D7A0A1F@common-lisp.net> Hi, I had to make a couple of small changes to compile/load the latest version (cvs head) of pg-dot-lisp with LispWorks 5. Enclosed is a cvs diff -u (svc-lw5-changes). It would be very nice if pg-dot-lisp ran without modifications on LispWorks. The main problem with LispWorks is that although no package with the name "POSTGRESQL" exists in the Personal and Professional editions of LW, that name is reserved and defining such a package results in an error. This is because in the Enterprise edition of LW, the addon product Common SQL does use a package with the name "POSTGRESQL". Currently, the main package defined by pg-dot-lisp is called "POSTGRESQL" and has "PG" as nickname. I suggest to name this package "PG-DOT-LISP" (or even "PG.LISP") on LW (#+lispworks) and to use the same nickname. In all source files, I have replaced (in- package :postgresql) to (in-package :pg) - if you don't like this, we could do this conditionally for LW. Furthermore, for some reason, I had to place an eval-when (:compile- toplevel) around the definition of the macro assemble-ub32 in md5.lisp, otherwise the defconstant +md5-magic-[abcd]+ failed to compile (full error). In the pg.asd file, the LW dependency on "comm" does not work for me (full error) and might safely be removed. I removed the (defvar *pg-client-encoding*) declaration in sysdep.lisp because it isn't needed there and is redefined pg.lisp, which gives a warning. I also removed the declaim inline for %flush for LW since it didn't work (inline expansion failed). All tests seem to run successfully. Thanks again for pg.lisp, it works very well, is easy to understand and work with. Regards, Sven -------------- next part -------------- A non-text attachment was scrubbed... Name: svc-lw5-changes Type: application/octet-stream Size: 6524 bytes Desc: not available URL: -------------- next part -------------- From rbc at rbcarleton.com Sat Mar 29 21:57:24 2008 From: rbc at rbcarleton.com (Bruce Carleton) Date: Sat, 29 Mar 2008 14:57:24 -0700 Subject: [pg-devel] Loading pg into sbcl Message-ID: <2CCEB5C3-1751-43D5-B2B0-CA462DBAD5FD@rbcarleton.com> I'm trying to use pg.lisp with sbcl-1.0.10 and postgres-8.2.5 on FreeBSD 7. I've copied "pg" from cvs into the /usr/local/lib/sbcl/ site-systems directory. I also built the fasl files by running (asdf:operate 'asdf:load-op 'pg) in the directory. All of that worked without error. I'm not really sure of how to require pg when I make subsequent starts of sbcl. I'm looking for the right way to load pg after I've started sbcl. I've mostly used guile with simplesql in the past. This is my first serious attempt to use CL database access. I'm just starting to learn common lisp/sbcl loading procedures. Any tips would be appreciated. Thanks, --Bruce From attila.lendvai at gmail.com Sat Mar 29 22:07:39 2008 From: attila.lendvai at gmail.com (Attila Lendvai) Date: Sat, 29 Mar 2008 23:07:39 +0100 Subject: [pg-devel] Loading pg into sbcl In-Reply-To: <2CCEB5C3-1751-43D5-B2B0-CA462DBAD5FD@rbcarleton.com> References: <2CCEB5C3-1751-43D5-B2B0-CA462DBAD5FD@rbcarleton.com> Message-ID: > I'm looking for the right way to load pg after I've started sbcl. > I've mostly used guile with simplesql in the past. This is my first > serious attempt to use CL database access. I'm just starting to > learn common lisp/sbcl loading procedures. Any tips would be > appreciated. i'd check out http://common-lisp.net/project/cl-rdbms/ (or postmodern if you don't want database independence and you think that it makes your life simpler). -- attila From rbc at rbcarleton.com Sat Mar 29 22:22:12 2008 From: rbc at rbcarleton.com (Bruce Carleton) Date: Sat, 29 Mar 2008 15:22:12 -0700 Subject: [pg-devel] Loading pg into sbcl In-Reply-To: References: <2CCEB5C3-1751-43D5-B2B0-CA462DBAD5FD@rbcarleton.com> Message-ID: <702E96D4-8274-4218-AEB0-15342054A47F@rbcarleton.com> Does it depend on the postgres c api? I'm trying to stay away from that. On Mar 29, 2008, at 3:07 PM, Attila Lendvai wrote: >> I'm looking for the right way to load pg after I've started sbcl. >> I've mostly used guile with simplesql in the past. This is my first >> serious attempt to use CL database access. I'm just starting to >> learn common lisp/sbcl loading procedures. Any tips would be >> appreciated. > > i'd check out http://common-lisp.net/project/cl-rdbms/ (or postmodern > if you don't want database independence and you think that it makes > your life simpler). > > -- > attila --- Bruce Carleton + rbc at insidernewswire.com + (415) 390-2296 From rbc at rbcarleton.com Sat Mar 29 23:31:22 2008 From: rbc at rbcarleton.com (Bruce Carleton) Date: Sat, 29 Mar 2008 16:31:22 -0700 Subject: [pg-devel] Loading pg into sbcl In-Reply-To: <2CCEB5C3-1751-43D5-B2B0-CA462DBAD5FD@rbcarleton.com> References: <2CCEB5C3-1751-43D5-B2B0-CA462DBAD5FD@rbcarleton.com> Message-ID: <95C313B1-7C8D-4985-8CFF-B327CEBC578D@rbcarleton.com> I figured out a little more. I created a asdf install package and used the asdf-install:install procedure to install the package without fatal errors. I just have to put together enough test code to access my database. I may be on my way. Best regards, --Bruce On Mar 29, 2008, at 2:57 PM, Bruce Carleton wrote: > I'm trying to use pg.lisp with sbcl-1.0.10 and postgres-8.2.5 on > FreeBSD 7. I've copied "pg" from cvs into the /usr/local/lib/sbcl/ > site-systems directory. I also built the fasl files by running > (asdf:operate 'asdf:load-op 'pg) in the directory. All of that > worked without error. I'm not really sure of how to require pg > when I make subsequent starts of sbcl. > > I'm looking for the right way to load pg after I've started sbcl. > I've mostly used guile with simplesql in the past. This is my > first serious attempt to use CL database access. I'm just starting > to learn common lisp/sbcl loading procedures. Any tips would be > appreciated. > > Thanks, > > --Bruce > > > > _______________________________________________ > pg-cvs site list > pg-cvs at common-lisp.net > http://common-lisp.net/mailman/listinfo/pg-cvs --- Bruce Carleton + rbc at insidernewswire.com + (415) 390-2296 From rbc at rbcarleton.com Sun Mar 30 01:47:24 2008 From: rbc at rbcarleton.com (Bruce Carleton) Date: Sat, 29 Mar 2008 18:47:24 -0700 Subject: [pg-devel] Loading pg into sbcl In-Reply-To: <95C313B1-7C8D-4985-8CFF-B327CEBC578D@rbcarleton.com> References: <2CCEB5C3-1751-43D5-B2B0-CA462DBAD5FD@rbcarleton.com> <95C313B1-7C8D-4985-8CFF-B327CEBC578D@rbcarleton.com> Message-ID: <43980E0F-E195-4A32-AEB7-37AE7D9D51E3@rbcarleton.com> I'm up and running now. All I need is: (require 'asdf) (asdf:oos 'asdf:load-op :pg) After that, I have access to the pg procedures. Best regards, --Bruce On Mar 29, 2008, at 4:31 PM, Bruce Carleton wrote: > I figured out a little more. I created a asdf install package and > used the asdf-install:install procedure to install the package > without fatal errors. I just have to put together enough test code > to access my database. > > I may be on my way. > > Best regards, > > --Bruce > > > On Mar 29, 2008, at 2:57 PM, Bruce Carleton wrote: >> I'm trying to use pg.lisp with sbcl-1.0.10 and postgres-8.2.5 on >> FreeBSD 7. I've copied "pg" from cvs into the /usr/local/lib/sbcl/ >> site-systems directory. I also built the fasl files by running >> (asdf:operate 'asdf:load-op 'pg) in the directory. All of that >> worked without error. I'm not really sure of how to require pg >> when I make subsequent starts of sbcl. >> >> I'm looking for the right way to load pg after I've started sbcl. >> I've mostly used guile with simplesql in the past. This is my >> first serious attempt to use CL database access. I'm just >> starting to learn common lisp/sbcl loading procedures. Any tips >> would be appreciated. >> >> Thanks, >> >> --Bruce >> >> >> >> _______________________________________________ >> pg-cvs site list >> pg-cvs at common-lisp.net >> http://common-lisp.net/mailman/listinfo/pg-cvs > > --- > Bruce Carleton + rbc at insidernewswire.com + (415) 390-2296 > > > > _______________________________________________ > pg-cvs site list > pg-cvs at common-lisp.net > http://common-lisp.net/mailman/listinfo/pg-cvs --- Bruce Carleton + rbc at insidernewswire.com + (415) 390-2296 From attila.lendvai at gmail.com Sun Mar 30 21:39:58 2008 From: attila.lendvai at gmail.com (Attila Lendvai) Date: Sun, 30 Mar 2008 22:39:58 +0100 Subject: [pg-devel] Loading pg into sbcl In-Reply-To: <702E96D4-8274-4218-AEB0-15342054A47F@rbcarleton.com> References: <2CCEB5C3-1751-43D5-B2B0-CA462DBAD5FD@rbcarleton.com> <702E96D4-8274-4218-AEB0-15342054A47F@rbcarleton.com> Message-ID: > Does it depend on the postgres c api? I'm trying to stay away from > that. no. -- attila