Re: Creating Primary Key after CREATE TABLE: Is Sequence created? - Mailing list pgsql-general

From mdr
Subject Re: Creating Primary Key after CREATE TABLE: Is Sequence created?
Date
Msg-id 1380310852363-5772642.post@n5.nabble.com
Whole thread Raw
In response to Re: Creating Primary Key after CREATE TABLE: Is Sequence created?  (Elliot <yields.falsehood@gmail.com>)
Responses Re: Creating Primary Key after CREATE TABLE: Is Sequence created?  (John R Pierce <pierce@hogranch.com>)
Re: Creating Primary Key after CREATE TABLE: Is Sequence created?  (John R Pierce <pierce@hogranch.com>)
List pgsql-general
Hi David and John -

Thank you for your answers on the SERIAL, SEQUENCE and thus PRIMARY KEY.

I did not realize there was a column of type SERIAL that creates a SEQUENCE.

However, now I have a different question.

Is it possible to create a column of type SQL:2011 types (INTEGER or such)
and then connect a SEQUENCE to it and make that column a PRIMARY KEY -
without creating a column of type SERIAL?

It seems column of type SERIAL is specific to Postgres and will make my
script Postgres dependent?

Just in case I decide to go to MySQL. Most likely not, but just wanted to
manage to SQL:2011.

Thank you again.



--
View this message in context:
http://postgresql.1045698.n5.nabble.com/Creating-Primary-Key-after-CREATE-TABLE-Is-Sequence-created-tp5772633p5772642.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


pgsql-general by date:

Previous
From: Elliot
Date:
Subject: Re: Creating Primary Key after CREATE TABLE: Is Sequence created?
Next
From: Monosij
Date:
Subject: Re: Trying to create DB / user to import some data