Skip to content

Commit

Permalink
Fix SQL query for updating a database
Browse files Browse the repository at this point in the history
When using the new middle format and --extra-attributes the SQL query
was broken.
  • Loading branch information
joto committed Jan 27, 2024
1 parent 6375e05 commit e38940e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/middle-pgsql.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1376,7 +1376,7 @@ void middle_pgsql_t::update_users_table()
m_users_table.name());

m_db_connection.exec("PREPARE insert_user(int8, text) AS"
" INSERT INTO {}\"{}\" (id, name) VALUES ($1, $2)"
" INSERT INTO {}.\"{}\" (id, name) VALUES ($1, $2)"
" ON CONFLICT (id) DO UPDATE SET id=EXCLUDED.id",
m_users_table.schema(), m_users_table.name());

Expand Down

0 comments on commit e38940e

Please sign in to comment.