Re: Remove Modifiers on Table

From: Carlos Mennens <carlos(dot)mennens(at)gmail(dot)com>
To: PostgreSQL <pgsql-general(at)postgresql(dot)org>
Subject: Re: Remove Modifiers on Table
Date: 2011-05-17 16:35:16
Message-ID: BANLkTikiZ=SngfUvxqz+KCOJ5CWnjRJMQA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, May 17, 2011 at 12:12 PM, Raymond O'Donnell <rod(at)iol(dot)ie> wrote:
> Well, the SERIAL pseudo-type creates the sequence, associates it with the
> column, and sets a DEFAULT on the column which executes the nextval()
> function on the sequence - all in one fell swoop. Read all about it here:
>
> http://www.postgresql.org/docs/9.0/static/datatype-numeric.html#DATATYPE-SERIAL

Wow I had no idea. So I do NOT need to manually create a sequence with:

CREATE SEQUENCE blah_id_seq;

And instead I can just use the SERIAL data type, unless I understood
that wrong. I'm going to read up on the URL you provided.

Thank you so much!

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Raymond O'Donnell 2011-05-17 16:38:46 Re: Remove Modifiers on Table
Previous Message Raymond O'Donnell 2011-05-17 16:12:13 Re: Remove Modifiers on Table