Received: from beamish.nsd.ca ([205.150.156.194]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g0DMSZB72734 for ; Sun, 13 Jan 2002 17:28:35 -0500 (EST) (envelope-from jllachan@nsd.ca) Received: (from smap@localhost) by beamish.nsd.ca (8.9.3/8.9.3) id RAA01752; Sun, 13 Jan 2002 17:28:34 -0500 X-Authentication-Warning: beamish.nsd.ca: smap set sender to using -f Received: from reddog.nsd.ca(192.168.101.30) by beamish.nsd.ca via smap (V2.1/2.1+anti-relay+anti-spam) id xma001750; Sun, 13 Jan 02 17:28:16 -0500 Received: from nsd.ca (jllachan-linux.nsd.ca [192.168.101.148]) by reddog.nsd.ca (8.8.7/8.8.7) with ESMTP id RAA14131; Sun, 13 Jan 2002 17:53:32 -0500 Message-ID: <3C420C6A.6AB4E635@nsd.ca> Date: Sun, 13 Jan 2002 17:38:34 -0500 From: Jean-Luc Lachance X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.4.9-12 i686) X-Accept-Language: en MIME-Version: 1.0 To: "Paulo J. Matos" CC: pgsql-sql@postgresql.org Subject: Re: pg with different sql? References: <87y9j1j4bj.fsf@localhost.localdomain> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200201/114 X-Sequence-Number: 6203 You should add a semi-colon at the end of each statement. "Paulo J. Matos" wrote: > > Hi all, > > I'm new to postgres and I'm doing a database project for a > subject at college in postgres. I've studied databases using > DataBases Management Systems by Ramakrishnan. > I've done some create tables and at psql interactive prompt I've > done: > \i proj.sql > (where proj.sql is the filename with the CREATE TABLEs) > > AFAIK, SQL is standard and should be the same for all DBMSs. > > For example: > CREATE TABLE socio ( > id integer SERIAL PRIMARY KEY, > nome varchar, > alcunha string, > data_filiacao date) > > CREATE TABLE paga_cota ( > ano integer, > mes integer, > valor integer, > id integer, > PRIMARY KEY(id,ano,mes), > FOREIGN KEY(id) REFERENCES(socio)) > > After this I get an error around CREATE (of the 2nd table). I > just can't imagine what it might be. > > I'd appreciate your help. > > TIA, > My best regards, > -- > Paulo J. Matos : pocm(_at_)rnl.ist.utl.pt > Instituto Superior Tecnico - Lisbon > Software & Computer Engineering - A.I. > - > http://www.rnl.ist.utl.pt/~pocm > --- > Yes, God had a deadline... > So, He wrote it all in Lisp! > > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? > > http://archives.postgresql.org