Skip to content

Pure PostgreSQL - #1

Merged
haiodo merged 4 commits into
developfrom
purePostgress
Nov 17, 2025
Merged

haiodo merged 4 commits into
developfrom
purePostgress

Conversation

@haiodo

@haiodo haiodo commented Nov 15, 2025 •

Copy link
Copy Markdown
Owner

This pull request introduces several improvements and fixes related to database support, particularly enhancing compatibility between CockroachDB and PostgreSQL. The main changes include adding real PostgreSQL integration tests, introducing database flavor detection, updating SQL logic for compatibility, and improving upsert operations. There are also minor fixes, such as improved logging and escaping in the datalake service.

Database compatibility and testing improvements:

  • Added real PostgreSQL integration tests in postgres-real.test.ts to ensure feature parity and reliability between CockroachDB and PostgreSQL backends.
  • Introduced the DBFlavor type and logic to detect the database flavor at runtime using the new getDbFlavor utility, allowing code to adapt to CockroachDB or PostgreSQL features as needed. [1] [2] [3] [4] [5]
  • Updated PostgresAccountDB to accept and use the detected dbFlavor, and to pass it to migrations for flavor-specific logic. [1] [2]

SQL and migration fixes for compatibility:

  • Modified SQL queries to join userProfile for country and city fields, improving data accuracy and compatibility. [1] [2]
  • Updated upsert operations in the datalake service to use standard INSERT ... ON CONFLICT DO UPDATE syntax, ensuring compatibility with both PostgreSQL and CockroachDB, and replaced UPSERT statements accordingly. [1] [2] [3] [4]

CI/CD and workflow enhancements:

  • Added a new GitHub Actions workflow job uitest-cockroach for running UI tests against CockroachDB, ensuring continuous integration coverage for both supported databases.

Other fixes and improvements:

  • Improved logging and error messages in the datalake service for better debugging and clarity.
  • Enhanced value escaping in SQL queries to handle single quotes correctly, preventing SQL injection or syntax errors.
  • Corrected the OID for BIGINT in the datalake service and added warnings about potential precision loss when parsing large integers.
  • Minor code style and logic fixes in spacePermissions.ts for readability.

@haiodo
haiodo requested a review from aonnikov November 15, 2025 17:30
@haiodo
haiodo force-pushed the purePostgress branch 2 times, most recently from f25c54f to 0e55cdb Compare November 15, 2025 19:22
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
+ Optimize a stream docker build
@haiodo
haiodo force-pushed the purePostgress branch 2 times, most recently from ad1223f to 709575d Compare November 17, 2025 15:30
@haiodo
haiodo merged commit 13590a0 into develop Nov 17, 2025
1 of 4 checks passed
@haiodo
haiodo deleted the purePostgress branch November 17, 2025 15:43
haiodo pushed a commit that referenced this pull request Nov 19, 2025
haiodo added a commit that referenced this pull request Jan 11, 2026
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

Successfully merging this pull request may close these issues.

2 participants