Received: from ch1.gisca.adelaide.edu.au (ch1.gisca.adelaide.edu.au [129.127.27.2]) by hub.org (8.8.8/8.7.5) with ESMTP id EAA09922 for ; Mon, 14 Sep 1998 04:26:35 -0400 (EDT) Received: from tsg109.gisca.adelaide.edu.au (tsg109.gisca.adelaide.edu.au [129.127.27.109]) by ch1.gisca.adelaide.edu.au (8.8.5/8.8.5) with ESMTP id RAA17994; Mon, 14 Sep 1998 17:57:02 +0930 (CST) Received: (from oduke@localhost) by tsg109.gisca.adelaide.edu.au (8.7.3/8.7.3) id RAA03034; Mon, 14 Sep 1998 17:57:01 +0930 (CST) From: "Oliver Duke-Williams" Message-Id: <9809141757.ZM3032@tsg109.gisca.adelaide.edu.au> Date: Mon, 14 Sep 1998 17:57:01 -0600 X-Mailer: Z-Mail (3.2.3 08feb96 MediaMail) To: pgsql-sql@postgresql.org, phplib@shonline.de Subject: SQL probs with phplib Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Hi, I'm trying to set up phplib (release 5) for use with postgresql(6.3 I _think_ but pg_version is empty, and I can't see an actual version number anywhere... ), and having a couple of problems with the supplied file create_database.sql (originally written with mySQL in mind). Specifically, in the first table created: CREATE TABLE active_sessions ( sid varchar(32) DEFAULT '' NOT NULL, name varchar(32) DEFAULT '' NOT NULL, val text, changed varchar(14) DEFAULT '' NOT NULL, PRIMARY KEY (sid,name), KEY changed (changed) ); an error is reported: ERROR: type name lookup of changed failed (In postgres, do I need to go though a 'create type' process here?) and in the second table: CREATE TABLE auth_user ( uid varchar(32) DEFAULT '' NOT NULL, username varchar(32) DEFAULT '' NOT NULL, password varchar(32) DEFAULT '' NOT NULL, perms varchar(255), PRIMARY KEY (uid), UNIQUE k_username (username) ); the following error is generated: ERROR: parser: Syntax error at or near "k_username" (Will this need some additional command aling the lines of 'create unique index'?) Having drawn a blank in searching list archives, I'd be grateful for any advice about what the correct pgsql versions of the above should be. NB: This is posted to two lists - I'm happy to summarise later if people don't want to xpost replies. Thanks, Oliver