René's URL Explorer Experiment


Title: Use ON CONFLICT DO SELECT in DB.upsert() with PostgreSQL 19 by Cito · Pull Request #148 · PyGreSQL/PyGreSQL · GitHub

Open Graph Title: Use ON CONFLICT DO SELECT in DB.upsert() with PostgreSQL 19 by Cito · Pull Request #148 · PyGreSQL/PyGreSQL

X Title: Use ON CONFLICT DO SELECT in DB.upsert() with PostgreSQL 19 by Cito · Pull Request #148 · PyGreSQL/PyGreSQL

Description: Closes #134. When no columns shall be updated, DB.upsert() used ON CONFLICT DO NOTHING and then read the existing row with a separate get(), so the row could be changed or deleted by another session in between. With PostgreSQL 19 or newer, it now uses ON CONFLICT DO SELECT, which returns the existing row in the same statement. Older servers keep the current behavior, and the result of upsert() does not change. Main changes: DB.upsert() chooses DO SELECT or DO NOTHING by server version. New test that checks the statements sent on both kinds of servers. Docs note and changelog entry.

Open Graph Description: Closes #134. When no columns shall be updated, DB.upsert() used ON CONFLICT DO NOTHING and then read the existing row with a separate get(), so the row could be changed or deleted by another sessio...

X Description: Closes #134. When no columns shall be updated, DB.upsert() used ON CONFLICT DO NOTHING and then read the existing row with a separate get(), so the row could be changed or deleted by another sessio...

Opengraph URL: https://github.com/PyGreSQL/PyGreSQL/pull/148

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.4

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:81155edb-dddc-ea6f-5e9e-4963c60da587
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA51C:E7908:1D80FA:29AE63:6B04681D
html-safe-noncedd6146e689896871e76ebcb643be7ab0c7040ceea4498c06ad5062f19726a9cb
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNTFDOkU3OTA4OjFEODBGQToyOUFFNjM6NkIwNDY4MUQiLCJ2aXNpdG9yX2lkIjoiOTAyNjIzODIxODQ3MzU3NDY5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac1c2936a30024034dcdfaefffbfa9045528619a3a4517792668bd6ab5c65b738e
hovercard-subject-tagpull_request:5454287900
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/PyGreSQL/PyGreSQL/pull/148/files
twitter:imagehttps://avatars.githubusercontent.com/u/464599?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/464599?s=400&v=4
og:image:altCloses #134. When no columns shall be updated, DB.upsert() used ON CONFLICT DO NOTHING and then read the existing row with a separate get(), so the row could be changed or deleted by another sessio...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None83e4c0e58c5162177f3c161c5fbad38527ae04c11ac14980f9f9d85ae2027b1f
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/PyGreSQL/PyGreSQL git https://github.com/PyGreSQL/PyGreSQL.git
octolytics-dimension-user_id60857770
octolytics-dimension-user_loginPyGreSQL
octolytics-dimension-repository_id51212044
octolytics-dimension-repository_nwoPyGreSQL/PyGreSQL
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id51212044
octolytics-dimension-repository_network_root_nwoPyGreSQL/PyGreSQL
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseca4d07a7cef4e4b75f821dc25e7300d80c1450a9
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/PyGreSQL/PyGreSQL/pull/148/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FPyGreSQL%2FPyGreSQL%2Fpull%2F148%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FPyGreSQL%2FPyGreSQL%2Fpull%2F148%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=PyGreSQL%2FPyGreSQL
Reloadhttps://github.com/PyGreSQL/PyGreSQL/pull/148/files
Reloadhttps://github.com/PyGreSQL/PyGreSQL/pull/148/files
Reloadhttps://github.com/PyGreSQL/PyGreSQL/pull/148/files
PyGreSQLhttps://github.com/PyGreSQL
PyGreSQLhttps://github.com/PyGreSQL/PyGreSQL
Codehttps://github.com/PyGreSQL/PyGreSQL
Issues21 (21)https://github.com/PyGreSQL/PyGreSQL/issues
Pull requests1 (1)https://github.com/PyGreSQL/PyGreSQL/pulls
Actionshttps://github.com/PyGreSQL/PyGreSQL/actions
Projectshttps://github.com/PyGreSQL/PyGreSQL/projects
Security and qualityhttps://github.com/PyGreSQL/PyGreSQL/security
Insightshttps://github.com/PyGreSQL/PyGreSQL/insights
Sign up for GitHub https://github.com/signup?return_to=%2FPyGreSQL%2FPyGreSQL%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2FPyGreSQL%2FPyGreSQL%2Fissues%2Fnew%2Fchoose
Citohttps://github.com/Cito
mainhttps://github.com/PyGreSQL/PyGreSQL/tree/main
upsert-do-selecthttps://github.com/PyGreSQL/PyGreSQL/tree/upsert-do-select
Conversation 0 https://github.com/PyGreSQL/PyGreSQL/pull/148
Commits 1 https://github.com/PyGreSQL/PyGreSQL/pull/148/commits
Checks 34 https://github.com/PyGreSQL/PyGreSQL/pull/148/checks
Files changed 4 https://github.com/PyGreSQL/PyGreSQL/pull/148/files
Use ON CONFLICT DO SELECT in DB.upsert() with PostgreSQL 19 https://github.com/PyGreSQL/PyGreSQL/pull/148/files#top
Show all changes 1 commit https://github.com/PyGreSQL/PyGreSQL/pull/148/files
950f265 Use ON CONFLICT DO SELECT in DB.upsert() with PostgreSQL 19 (#134) Cito Nov 23, 2026 https://github.com/PyGreSQL/PyGreSQL/pull/148/commits/950f26570edb2dcb07202acb0a52549e7220acc0
Clear filters https://github.com/PyGreSQL/PyGreSQL/pull/148/files
Please reload this pagehttps://github.com/PyGreSQL/PyGreSQL/pull/148/files
Please reload this pagehttps://github.com/PyGreSQL/PyGreSQL/pull/148/files
changelog.rst https://github.com/PyGreSQL/PyGreSQL/pull/148/files#diff-af89d17b84a7470a2e9662d1d1281c96a163ba0c438e476656c4a336a19a120a
db_wrapper.rst https://github.com/PyGreSQL/PyGreSQL/pull/148/files#diff-427a86e1cadfc51248b1ed9205918aaa6daa2b44a7cf53bec059f97c70d7912d
db.py https://github.com/PyGreSQL/PyGreSQL/pull/148/files#diff-69568049815164a8736eeb69d9e57b62da5a3edc75bfcfd2285a7145611f713d
test_classic_dbwrapper.py https://github.com/PyGreSQL/PyGreSQL/pull/148/files#diff-17a518e29c7197473b0a85feada64b6eef8893c64ab02f0059fee68b112bd340
docs/contents/changelog.rsthttps://github.com/PyGreSQL/PyGreSQL/pull/148/files#diff-af89d17b84a7470a2e9662d1d1281c96a163ba0c438e476656c4a336a19a120a
View file https://github.com/PyGreSQL/PyGreSQL/blob/950f26570edb2dcb07202acb0a52549e7220acc0/docs/contents/changelog.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/PyGreSQL/PyGreSQL/pull/148/{{ revealButtonHref }}
https://github.com/PyGreSQL/PyGreSQL/pull/148/files#diff-af89d17b84a7470a2e9662d1d1281c96a163ba0c438e476656c4a336a19a120a
https://github.com/PyGreSQL/PyGreSQL/pull/148/files#diff-af89d17b84a7470a2e9662d1d1281c96a163ba0c438e476656c4a336a19a120a
docs/contents/pg/db_wrapper.rsthttps://github.com/PyGreSQL/PyGreSQL/pull/148/files#diff-427a86e1cadfc51248b1ed9205918aaa6daa2b44a7cf53bec059f97c70d7912d
View file https://github.com/PyGreSQL/PyGreSQL/blob/950f26570edb2dcb07202acb0a52549e7220acc0/docs/contents/pg/db_wrapper.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/PyGreSQL/PyGreSQL/pull/148/{{ revealButtonHref }}
https://github.com/PyGreSQL/PyGreSQL/pull/148/files#diff-427a86e1cadfc51248b1ed9205918aaa6daa2b44a7cf53bec059f97c70d7912d
https://github.com/PyGreSQL/PyGreSQL/pull/148/files#diff-427a86e1cadfc51248b1ed9205918aaa6daa2b44a7cf53bec059f97c70d7912d
pg/db.pyhttps://github.com/PyGreSQL/PyGreSQL/pull/148/files#diff-69568049815164a8736eeb69d9e57b62da5a3edc75bfcfd2285a7145611f713d
View file https://github.com/PyGreSQL/PyGreSQL/blob/950f26570edb2dcb07202acb0a52549e7220acc0/pg/db.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/PyGreSQL/PyGreSQL/pull/148/{{ revealButtonHref }}
https://github.com/PyGreSQL/PyGreSQL/pull/148/files#diff-69568049815164a8736eeb69d9e57b62da5a3edc75bfcfd2285a7145611f713d
https://github.com/PyGreSQL/PyGreSQL/pull/148/files#diff-69568049815164a8736eeb69d9e57b62da5a3edc75bfcfd2285a7145611f713d
https://github.com/PyGreSQL/PyGreSQL/pull/148/files#diff-69568049815164a8736eeb69d9e57b62da5a3edc75bfcfd2285a7145611f713d
https://github.com/PyGreSQL/PyGreSQL/pull/148/files#diff-69568049815164a8736eeb69d9e57b62da5a3edc75bfcfd2285a7145611f713d
tests/test_classic_dbwrapper.pyhttps://github.com/PyGreSQL/PyGreSQL/pull/148/files#diff-17a518e29c7197473b0a85feada64b6eef8893c64ab02f0059fee68b112bd340
View file https://github.com/PyGreSQL/PyGreSQL/blob/950f26570edb2dcb07202acb0a52549e7220acc0/tests/test_classic_dbwrapper.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/PyGreSQL/PyGreSQL/pull/148/{{ revealButtonHref }}
https://github.com/PyGreSQL/PyGreSQL/pull/148/files#diff-17a518e29c7197473b0a85feada64b6eef8893c64ab02f0059fee68b112bd340
https://github.com/PyGreSQL/PyGreSQL/pull/148/files#diff-17a518e29c7197473b0a85feada64b6eef8893c64ab02f0059fee68b112bd340
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlno-cache

Viewport: width=device-width


URLs of crawlers that visited me.