Re: pg with different sql?

Поиск
Список
Период
Сортировка
От George Moga
Тема Re: pg with different sql?
Дата
Msg-id 3C4211D7.20204@dsn.ro
обсуждение исходный текст
Ответ на pg with different sql?  (pocm@rnl.ist.utl.pt (Paulo J. Matos))
Список pgsql-sql
Paulo J. Matos wrote:
> Hi all,> CREATE TABLE socio (>     id integer SERIAL PRIMARY KEY,>     nome varchar,>     alcunha string,>
data_filiacaodate)>> 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
2ndtable). I> just can't imagine what it might be.>
 



First ...
SERIAL means an integer with primary key [tableName]_pkey (socio_pkey),
not null and default set to sequence: [tableName]_[fieldName]_seq
(socio_id_seq).

Probably this is what you want!!
CREATE TABLE socio (id SERIAL,
...

Second ...
String ?? ... maybe char(x) or varchar(x) or text or ...

Third ...
FOREIGN KEY(id) REFERENCES socio ...




George Moga,george@dsn.roBraila, ROMANIA




В списке pgsql-sql по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pg with different sql?
Следующее
От: "Unnikrishnan Menon"
Дата:
Сообщение: Re: Problems with PL/PGSQL - functions