Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

247
Views
PostgreSQL create table fails on identity column

I'm trying to set up a Postgres table using DBeaver as my management tool to run queries. Everything seems to work OK until I try to generate a table with an identity column. I am getting this error:

ERROR: syntax error at or near "GENERATED"

This is the query that is failing:

create table public.test (
    id INT GENERATED BY DEFAULT AS IDENTITY 
)

This query works just fine:

create table public.test (
    id INT
)

I referenced data here and here to make sure the syntax was correct. What's going on?

EDIT: My problem was that my version is too old: 9.5.18 - needs to be 10 for this command to work.

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!