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

Hint() with PostgreSQL #691

Open
PeterN opened this issue Jul 3, 2023 · 0 comments
Open

Hint() with PostgreSQL #691

PeterN opened this issue Jul 3, 2023 · 0 comments

Comments

@PeterN
Copy link

PeterN commented Jul 3, 2023

I'm migrating a system that was on MS SQL to PostgreSQL. To help protect against deadlocks, the old code used Hint quite often:

db.Query<Table>().Hint("WITH (UPDLOCK)").Where(...)

The PostgreSQL equivalent is FOR UPDATE, however this is required at the end of the query instead of before the WHERE clause. Is this possible with npoco as is?

It is of course entirely possible that because PostgreSQL is completely different I won't need any such lock hinting.

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

1 participant