Tag: postgresql

59 votes
6 answers
1.3K views
Postgres error: null value in column "id" - during insert operation

I use postgresql and yii2 framework. Well I got a very interesting error message: SQLSTATE[23502]: Not null v

avatar
Charis
0 1 0 9
asked 07 September, 2021
61 votes
17 answers
1.2K views
Save PL/pgSQL output from PostgreSQL to a CSV file

What is the easiest way to save PL/pgSQL output from a PostgreSQL database to a CSV file? I'm using Pos

avatar
Dorinda
0 1 0 9
asked 07 September, 2021
55 votes
18 answers
1.4K views
Select first row in each GROUP BY group?

As the title suggests, I'd like to select the first row of each set of rows grouped with a GROUP BY. Spec

avatar
Juliane
0 1 0 9
asked 07 September, 2021