How to add CYCLE to BIGSERIAL in phpPgAdmin I'm trying to apply CYCLE to a BIGSERIAL in phpPgAdmin.

I've seen how to do it with a query, but I'd much rather be able to do it from phpPgAdmin.

Can this be done with phpPgAdmin?  If so, how?  If not, how can CYCLE be applied to a pre-existing BIGSERIAL column?
I don't use phpPgAmin. 

To change an existing column definition to use the CYCLE attribute you need to understand that this is an attribute of the sequence not the "column". 

A serial or bigserial is only a shorthand notation to assign a default value to a column which is take from a sequence.

When you define a column as serial Postgres automatically creates a sequences and applies the necessary default expression.

The sequence is usually called &lt;table_name&gt;_&lt;column_name&gt;_seq. But you can run a query to get the name of the generated sequence:

select pg_get_serial_sequence('your_table_name', 'your_column_name');


Once you know the name of the sequence, you can do the following:

alter sequence your_sequence_name cycle;


(Note that you need to commit that if you are not using auto-commit mode).

Here are some relevant links to the manual:


ALTER SEQUENCE: http://www.postgresql.org/docs/current/static/sql-altersequence.html
Details about the serial types: http://www.postgresql.org/docs/current/static/datatype-numeric.html#DATATYPE-SERIAL
Information functions: http://www.postgresql.org/docs/current/static/functions-info.html#FUNCTIONS-INFO-CATALOG-TABLE