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

193
Vistas
Using pgp.helpers.insert with RETURNING in statement

I've got really good help with creating INSERT statements dynamically in a previous question: NodeJS and pg-promise, insert dynamically from JSON-object

I've tried to look at the docs, and would like to include RETURNING in the INSERT statement, so I get the inserted record as output with pg-promise.

I'm using NodeJS with pg-promise.

Is it possible to return the inserted record with all columns?

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

You do so simply by appending the RETURNING clause to your query, and then executing it with a method according to the expected result.

For a complete example see the Extras section in Multi-row insert with pg-promise.

over 4 years ago · Santiago Trujillo Denunciar
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