Re: pg with different sql?

From: Jean-Luc Lachance <jllachan(at)nsd(dot)ca>
To: "Paulo J(dot) Matos" <pocm(at)rnl(dot)ist(dot)utl(dot)pt>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: pg with different sql?
Date: 2002-01-13 22:38:34
Message-ID: 3C420C6A.6AB4E635@nsd.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2002-01-13 22:39:34 Re: pg with different sql?
Previous Message Ian Barwick 2002-01-13 22:38:25 Re: pg with different sql?