Hi,
I'm using postmodern under OpenMCL. Connected to an empty database, I tried defining and creating a new table.
Doing this directly from the psql prompt gave a bunch of messages, but doing it from within Lisp caused serious trouble. Compare:
1.
jcorneli=# create table strs (strid SERIAL PRIMARY KEY, string TEXT NOT NULL UNIQUE); NOTICE: CREATE TABLE will create implicit sequence "strs_strid_seq" for serial column "strs.strid" NOTICE: CREATE TABLE will create implicit sequence "strs_strid_seq" for serial column "strs.strid" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "strs_pkey" for table "strs" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "strs_pkey" for table "strs" NOTICE: CREATE TABLE / UNIQUE will create implicit index "strs_string_key" for table "strs" NOTICE: CREATE TABLE / UNIQUE will create implicit index "strs_string_key" for table "strs" CREATE TABLE
2.
? (deftable strs () ((str_id :type serial :primary-key t) (string :type text :unique t)) (:indices str_id)) ? (create-table 'strs) ; Warning: Postgres warning: CREATE TABLE will create implicit sequence "strs_str_id_seq" for serial column "strs.str_id" ; While executing: CL-POSTGRES::GET-WARNING
Error in process listener(1): Postgresql protocol error: Unexpected message received: 1 While executing: CL-POSTGRES::SEND-QUERY Type :POP to abort.
Type :? for other options. 1 > :POP
Error in process listener(1): #<TCP-STREAM :CLOSED #x857FB3E> is closed While executing: CCL::STREAM-IOBLOCK Type :POP to abort.
Type :? for other options. 1 > :POP
This looks like a bug to me.
I have a table strs, now, that looks like this:
select * from strs; strid | string -------+-------- 1 | car 2 | has 3 | wheels 4 | bike
Attempting to run this under postmodern gives me an error:
? (execute (:insert-into 'strs :set 'string "predicate"))
Error in process listener(1): Database error 08P01: invalid message format Query: INSERT INTO strs (string) VALUES ('predicate') While executing: CL-POSTGRES::GET-ERROR Type :POP to abort.
Type :? for other options. 1 > :POP
Error in process listener(1): Database error 08P01: invalid frontend message type 0 While executing: CL-POSTGRES::GET-ERROR Type :POP to abort.
Type :? for other options. 1 > :POP
Hello Joe,
It looks like this is related to the issue reported by Bart Botta this week. There is a fix for that in the repository, but no new release has been made yet. Could you try fetching the latest files with darcs to see if this problem (and the in your other mail) gets solved by that?
Regards, Marijn
postmodern-devel@common-lisp.net