Try this command:
ALTER TABLE your_table ADD COLUMN key_column BIGSERIAL PRIMARY KEY;
Try it with the same DB-user as the one you have created the table.
More Related Contents:
- Auto increment table column
- Reset auto increment counter in postgres
- Custom SERIAL / autoincrement per group of values
- Serial numbers per group of rows for compound key
- Select rows which are not present in other table
- Optimize GROUP BY query to retrieve latest row per user
- How to implement a many-to-many relationship in PostgreSQL?
- Check if value exists in Postgres array
- How to use ANY instead of IN in a WHERE clause?
- Is there a shortcut for SELECT * FROM?
- sql statement error: “column .. does not exist”
- What is the difference between single quotes and double quotes in PostgreSQL?
- Constraint defined DEFERRABLE INITIALLY IMMEDIATE is still DEFERRED?
- Simulate CREATE DATABASE IF NOT EXISTS for PostgreSQL?
- Best way to count rows by arbitrary time intervals
- PostgreSQL sequence based on another column
- Sorting null values after all others, except special
- Call a set-returning function with an array argument multiple times
- Fastest check if row exists in PostgreSQL
- Discard millisecond part from timestamp
- Return setof record (virtual table) from function
- SQL Server 2005 ROW_NUMBER() without ORDER BY
- How do I cast a string to integer and have 0 in case of error in the cast with PostgreSQL?
- SQL column reference “id” is ambiguous
- How to use multiple CTEs in a single SQL query?
- IN Clause with NULL or IS NULL
- postgres – where in (list) – column does not exist
- incomplete information from query on pg_views [duplicate]
- Postgresql query between date ranges
- Why isn’t row level security enabled for Postgres views?