From: pocm@rnl.ist.utl.pt
To: pgsql-sql@postgresql.org
Subject: pg with different sql?
Date: 13 Jan 2002 22:04:16 +0000
Message-ID: <87y9j1j4bj.fsf@localhost.localdomain> (raw)
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!
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: pocm@rnl.ist.utl.pt
Subject: Re: pg with different sql?
In-Reply-To: <87y9j1j4bj.fsf@localhost.localdomain>
* 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