Serial Vs Sequence - Mailing list pgsql-general

From Adarsh Sharma
Subject Serial Vs Sequence
Date
Msg-id 4D47AE50.9000608@orkash.com
Whole thread Raw
Responses Re: Serial Vs Sequence  (Pavel Stehule <pavel.stehule@gmail.com>)
Re: Serial Vs Sequence  (John R Pierce <pierce@hogranch.com>)
List 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

pgsql-general by date:

Previous
From: AI Rumman
Date:
Subject: cast problem in Postgresql 9.0.1
Next
From: Pavel Stehule
Date:
Subject: Re: Serial Vs Sequence