pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Szandor van Verseveld <verseveld@nederland.net>
To: Oliver Duke-Williams <oduke@gisca.adelaide.edu.au>
To: pgsql-sql@postgresql.org
To: phplib@shonline.de
Subject: Re: [PHPLIB] SQL probs with phplib
Date: Mon, 14 Sep 1998 11:23:34 +0200
Message-ID: <011e01bddfc1$58ef4580$de6e43c1@verseveld.computel.nl> (raw)

I use the following to create the Postgres database:

CREATE TABLE active_sessions (
    sid varchar(32) DEFAULT '' NOT NULL,
    name varchar(32) DEFAULT '' NOT NULL,
    val text,
    changed varchar(14) DEFAULT '' NOT NULL
);
CREATE INDEX active_sessions_index ON active_sessions USING hash (sid
varchar_ops);
GRANT ALL ON active_sessions TO apache;

You can set the permissions to another user than apache.

Met vriendelijke groet,

Szandor van Verseveld
Nederland.Net
Icq: 14801584


-----Original Message-----
From: Oliver Duke-Williams <oduke@gisca.adelaide.edu.au>
To: pgsql-sql@postgresql.org <pgsql-sql@postgresql.org>; phplib@shonline.de
<phplib@shonline.de>
Date: maandag 14 september 1998 10:45
Subject: [PHPLIB] SQL probs with phplib


>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
>
>-
>PHP3 Base Library Mailing List. Send messages to <phplib@shonline.de>.
>To unsubscribe, send "unsubscribe" to <phplib-request@shonline.de> in
>the body, not the subject, of your message.
>




view thread (4+ messages)  latest in thread

Message-ID: <011e01bddfc1$58ef4580$de6e43c1@verseveld.computel.nl>
Permalink:  ../011e01bddfc1$58ef4580$de6e43c1@verseveld.computel.nl/
Also on:    postgresql.org/message-id/011e01bddfc1$58ef4580$de6e43c1@verseveld.computel.nl

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: verseveld@nederland.net, oduke@gisca.adelaide.edu.au, phplib@shonline.de
  Subject: Re: [PHPLIB] SQL probs with phplib
  In-Reply-To: <011e01bddfc1$58ef4580$de6e43c1@verseveld.computel.nl>
  References: <011e01bddfc1$58ef4580$de6e43c1@verseveld.computel.nl>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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