Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support inserting into variable number of subset of fields #125

Open
robinp opened this issue Sep 30, 2023 · 1 comment
Open

Support inserting into variable number of subset of fields #125

robinp opened this issue Sep 30, 2023 · 1 comment

Comments

@robinp
Copy link

robinp commented Sep 30, 2023

Hello,

It would be nice to support something like

execute conn "INSERT INTO tbl (?) VALUES (?)" (Multiple (ColNames [Identifier "a", ...]), Multiple (Values ...))

(Edit: added the Multiple constructor as something provisional)

Currently I need to perform some manual text concatenation of the Query string with repeat 5 "?" and the like, which is not very elegant.

Just an idea, not high-priority though. Alternate ideas welcome too.

@phadej
Copy link
Collaborator

phadej commented Sep 30, 2023

I mentioned that previously, I'm not a fan extending what postgresql-simple beyond what PQexecParams does (though it's not planned that postgresql-simple would start using it)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants