Serial Vs Sequence

From: Adarsh Sharma <adarsh(dot)sharma(at)orkash(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Serial Vs Sequence
Date: 2011-02-01 06:55:12
Message-ID: 4D47AE50.9000608@orkash.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dear all,

I am not able to distinct these two datatypes ( Serial and Sequence ) in
Postgresql which resembles like auto-increment in Mysql.

Which one gets priority and When ?

The only thing I am able to find is to use SERIAL because if a drop
table occurs , still SEQUENCE memory is not freed, its garbage remains.

However if we define a SERIAL column in a table , implicitly it makes a
sequence.

Could anyone Please describe me the difference and Which to Use When ?

Thanks & Regards

Adarsh Sharma

Responses

Browse pgsql-general by date

  From Date Subject
Next Message John R Pierce 2011-02-01 07:08:20 Re: Serial Vs Sequence
Previous Message AI Rumman 2011-02-01 06:14:29 cast problem in Postgresql 9.0.1