Re: database design questions
| От | Richard Broersma Jr |
|---|---|
| Тема | Re: database design questions |
| Дата | |
| Msg-id | 20060403151528.80406.qmail@web31812.mail.mud.yahoo.com обсуждение |
| Ответ на | Re: database design questions ("Tomi NA" <hefest@gmail.com>) |
| Список | pgsql-general |
--- Tomi NA <hefest@gmail.com> wrote:
> On 4/3/06, Ottavio Campana <ottavio@campana.vi.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
> );
you could also do:
CREATE TABLE person (
id BIGSERIAL,
name TEXT
);
Regards,
Richard
В списке pgsql-general по дате отправления: