Received: from serv0.ilse.net (serv0.ilse.nl [194.158.182.236]) by hub.org (8.9.3/8.9.3) with ESMTP id XAA16180 for ; Tue, 2 Nov 1999 23:00:32 -0500 (EST) (envelope-from mathijs@ilse.nl) Received: (from mathijs@localhost) by serv0.ilse.net (8.8.8/8.6.12) id FAA24159; Wed, 3 Nov 1999 05:00:27 +0100 (MET) Date: Wed, 3 Nov 1999 05:00:26 +0100 From: Mathijs Brands To: User & Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] why don't this create table work? Message-ID: <19991103050026.B24046@ilse.nl> References: <19991102175915.A80511@oscar.noc.cv.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre4i In-Reply-To: <19991102175915.A80511@oscar.noc.cv.net>; from marc@oscar.noc.cv.net on Tue, Nov 02, 1999 at 05:59:15PM -0500 X-Unexpected-Header: The Spanish Inquisition On Tue, Nov 02, 1999 at 05:59:15PM -0500, User & allegedly wrote: > > here is the sql: > > nnm=> create table nnm_event_limits ( > nnm-> nodename varchar(256) not null, > nnm-> event_oid varchar(256) not null, > nnm-> always_never varchar(1) null, ^^^^^^^^^^ There is a 'not' missing... > nnm-> limit int4); > ERROR: parser: parse error at or near "null" > > This is converted from openviews table scheema. here it is without the > trailing null on always_never: > nnm=> create table nnm_event_limits ( > nnm-> nodename varchar(256) not null, > nnm-> event_oid varchar(256) not null, > nnm-> always_never varchar(1) , > nnm-> limit int4); > ERROR: parser: parse error at or near "limit" > > limit is not a reserved word as far as I can tell, any ideas? Actually, it is. You can do something like the following: select username from users limit 10; > I am useing 6.5, got it from PG_VERSION file. You're probably running 6.5.1 or 6.5.2. You can easily check this by starting psql and checking the first few lines. It will tell you the exact versionnumber. > ps would useing text instead of varchar be a good thing to do? That is my understanding, but I'm not completely sure. Mathijs