pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jean-Luc Lachance <jllachan@nsd.ca>
To: Paulo J. Matos <pocm@rnl.ist.utl.pt>
Cc: pgsql-sql@postgresql.org
Subject: Re: pg with different sql?
Date: Sun, 13 Jan 2002 17:38:34 -0500
Message-ID: <3C420C6A.6AB4E635@nsd.ca> (raw)
References: <87y9j1j4bj.fsf@localhost.localdomain>

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



view thread (5+ messages)  latest in thread

Message-ID: <3C420C6A.6AB4E635@nsd.ca>
Permalink:  ../3C420C6A.6AB4E635@nsd.ca/
Also on:    postgresql.org/message-id/3C420C6A.6AB4E635@nsd.ca

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: jllachan@nsd.ca, pocm@rnl.ist.utl.pt
  Subject: Re: pg with different sql?
  In-Reply-To: <3C420C6A.6AB4E635@nsd.ca>

* 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