Skip to content

Add support for UUID, money and other datatypes in postgres - #1395

Open
SaurabhSingh2115 wants to merge 6 commits into
GoogleCloudPlatform:masterfrom
SaurabhSingh2115:pg-spanner-datatype-parity
Open

Add support for UUID, money and other datatypes in postgres#1395
SaurabhSingh2115 wants to merge 6 commits into
GoogleCloudPlatform:masterfrom
SaurabhSingh2115:pg-spanner-datatype-parity

Conversation

@SaurabhSingh2115

Copy link
Copy Markdown

Fixes #545473957

Add explicit type bindings within the conversion engine for all newly supported native types (e.g., UUID, MONEY, OID, BIT) to ensure the system leverages native storage structures.

@SaurabhSingh2115
SaurabhSingh2115 requested a review from a team as a code owner September 2, 2026 06:28
@SaurabhSingh2115
SaurabhSingh2115 requested review from bharadwaj-aditya and darshan-sj and removed request for a team September 2, 2026 06:28
@SaurabhSingh2115
SaurabhSingh2115 marked this pull request as draft September 2, 2026 06:29
@codecov

codecov Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 51.50%. Comparing base (a046b9a) to head (a2a0134).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1395      +/-   ##
==========================================
+ Coverage   51.28%   51.50%   +0.22%     
==========================================
  Files         203      203              
  Lines       22980    23083     +103     
  Branches      552      552              
==========================================
+ Hits        11785    11889     +104     
+ Misses      10500    10499       -1     
  Partials      695      695              
Components Coverage Δ
backend-apis 46.10% <100.00%> (ø)
backend-library 57.22% <100.00%> (+0.30%) ⬆️
cli 26.62% <ø> (ø)
frontend 39.34% <ø> (+0.02%) ⬆️
Files with missing lines Coverage Δ
internal/reports/report_helpers.go 0.00% <ø> (ø)
sources/common/utils.go 48.96% <ø> (ø)
sources/postgres/data.go 82.15% <100.00%> (-0.15%) ⬇️
sources/postgres/infoschema.go 85.24% <100.00%> (+0.53%) ⬆️
sources/postgres/toddl.go 100.00% <100.00%> (ø)
spanner/ddl/ast.go 90.86% <ø> (ø)
webv2/api/schema.go 65.82% <100.00%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@SaurabhSingh2115
SaurabhSingh2115 marked this pull request as ready for review September 3, 2026 04:35
@pull-request-size pull-request-size Bot added size/XL and removed size/L labels Sep 3, 2026
@SaurabhSingh2115
SaurabhSingh2115 requested a review from a team September 3, 2026 10:33
Comment thread sources/postgres/toddl.go Outdated
case ddl.String:
return ddl.Type{Name: ddl.String, Len: ddl.MaxLength}, []internal.SchemaIssue{internal.Widened}
default:
return ddl.Type{Name: ddl.String, Len: ddl.MaxLength}, nil

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in default we do not raise the widened warning ?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed added warning for those which don't have native spanner typing

Comment thread sources/postgres/toddl.go Outdated
case ddl.String:
return ddl.Type{Name: ddl.String, Len: ddl.MaxLength}, []internal.SchemaIssue{internal.Widened}
default:
return ddl.Type{Name: ddl.Bytes, Len: ddl.MaxLength}, nil

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants