Received: from oscar.noc.cv.net (oscar.noc.cv.net [167.206.113.20]) by hub.org (8.9.3/8.9.3) with ESMTP id AAA29585 for ; Wed, 3 Nov 1999 00:08:36 -0500 (EST) (envelope-from marc@oscar.noc.cv.net) Received: (from marc@localhost) by oscar.noc.cv.net (8.9.3/8.9.3) id AAA30133; Wed, 3 Nov 1999 00:04:11 -0500 (EST) (envelope-from marc) Date: Wed, 3 Nov 1999 00:04:11 -0500 From: User & To: Mathijs Brands Cc: pgsql-sql@postgreSQL.org Subject: Re: [SQL] why don't this create table work? Message-ID: <19991103000411.A27669@oscar.noc.cv.net> References: <19991102175915.A80511@oscar.noc.cv.net> <19991103050026.B24046@ilse.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre3i In-Reply-To: <19991103050026.B24046@ilse.nl> On Wed, Nov 03, 1999 at 05:00:26AM +0100, Mathijs Brands wrote: > 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... Not from my reading, null is the assumed default it does not have to be put in but it can be if you choose to. > > 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; This will not help me create the table, selecting is not the problem the table will not get created so I cannot select on it. > > > 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. 6.5.2 from digging around in /usr/ports marc > > > ps would useing text instead of varchar be a good thing to do? > > That is my understanding, but I'm not completely sure. > > Mathijs > > ************ >