Re: database design questions

From: "Tomi NA" <hefest(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: database design questions
Date: 2006-04-03 14:50:34
Message-ID: d487eb8e0604030750t63444de4h5347ebf300fe312f@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 4/3/06, Ottavio Campana <ottavio(at)campana(dot)vi(dot)it> wrote:

> 3) faq 4.11.1 says
>
> > CREATE TABLE person (
> > id SERIAL,
> > name TEXT
> > );
> >
> >is automatically translated into this:
> >
> > CREATE SEQUENCE person_id_seq;
> > CREATE TABLE person (
> > id INT4 NOT NULL DEFAULT nextval('person_id_seq'),
> > name TEXT
> > );
>
> how can I do it with a INT8 instead of a INT4?
>
> Thank you
>

Is there a reason not to write explicitly?

CREATE SEQUENCE person_id_seq;
CREATE TABLE person (
id INT8 NOT NULL DEFAULT nextval('person_id_seq'),
name TEXT
);

Tomislav

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message William Leite Araújo 2006-04-03 15:01:10 Re: How to delete all operators
Previous Message Ottavio Campana 2006-04-03 14:38:03 database design questions