You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Does npgsql currently support VALUES Lists ? #2511
Yes, but it ultimately depends on exactly what you want to do with them. Npgsql just sends your SQL (and parameters) to PostgreSQL and provides the results, so it doesn't need to "support" any specific feature. Can you please provide more info on what you're looking to do?
Yes, but it ultimately depends on exactly what you want to do with them. Npgsql just sends your SQL (and parameters) to PostgreSQL and provides the results, so it doesn't need to "support" any specific feature. Can you please provide more info on what you're looking to do?
Because some of the query conditions come from the drop-down box, the amount of data selected in the drop-down box may be large, I would insert them to a temp table for good performence . I want use VALUES Lists instead of a temporary table.
I have no idea what drop-down box is used in your application, or how it related to VALUES or temporary tables... You will need to provide a clear description of what you want Npgsql to do here, can you provide a small code sample to illustrate?
I have no idea what drop-down box is used in your application, or how it related to VALUES or temporary tables... You will need to provide a clear description of what you want Npgsql to do here, can you provide a small code sample to illustrate?
Some script like
SELECT*FROM Users WHERE ID IN (VALUES (1), (2), (3))
SELECT*FROM (VALUES (1, 'one'), (2, 'two'), (3, 'three')) AS t (num,letter)
It's a const table expression and it's a part of SQL. The driver has nothing to do with it and doesn't alter any query you wrote. It just transfers data and command to the backend and reads responses.
If you want to provide a list of tuples you can use an array of composite types and the unnest function in the query.
Closing as it's not a Npgsql responsibility, but feel free to keep asking questions.
Activity
[-]Does npgsql current support VALUES Lists[/-][+]Does npgsql currently support VALUES Lists ?[/+]roji commentedon Jul 2, 2019
Yes, but it ultimately depends on exactly what you want to do with them. Npgsql just sends your SQL (and parameters) to PostgreSQL and provides the results, so it doesn't need to "support" any specific feature. Can you please provide more info on what you're looking to do?
dingsongjie commentedon Jul 2, 2019
Because some of the query conditions come from the drop-down box, the amount of data selected in the drop-down box may be large, I would insert them to a temp table for good performence . I want use VALUES Lists instead of a temporary table.
roji commentedon Jul 2, 2019
I have no idea what drop-down box is used in your application, or how it related to VALUES or temporary tables... You will need to provide a clear description of what you want Npgsql to do here, can you provide a small code sample to illustrate?
dingsongjie commentedon Jul 3, 2019
Some script like
You may need to take a look at this document.
YohDeadfall commentedon Jul 3, 2019
It's a const table expression and it's a part of SQL. The driver has nothing to do with it and doesn't alter any query you wrote. It just transfers data and command to the backend and reads responses.
If you want to provide a list of tuples you can use an array of composite types and the
unnestfunction in the query.Closing as it's not a Npgsql responsibility, but feel free to keep asking questions.