Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

248
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda