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

PG to PG: TSTZRange and JSONB #1687

Closed
wants to merge 12 commits into from
Closed

Conversation

Amogh-Bharadwaj
Copy link
Contributor

@Amogh-Bharadwaj Amogh-Bharadwaj commented May 7, 2024

PG to PG CDC:

  • Adds support for JSONB (now maps to JSONB on target)
  • Constructs the string for tstzrange (still text on target) in a way that you can cast to tstzrange like select mytstzrange::tstzrange from table. This would fail before as the string we were inserting was of some json type string. Null lower and upper bounds tested

Functionally tested

@serprex
Copy link
Member

serprex commented May 7, 2024

What's the motivation for this? PG<>PG should use PG type system to have this accuracy & more. This direction with qvalue is pulled both towards being a common denominator format & a union of everything intersected with postgres. In this case it goes further, supporting distinctions which are only meaningful to postgres. At that point you might as well just be passing pgtype values around

Ideally range types would be generalized

@@ -108,6 +110,8 @@ func (c *PostgresConnector) postgresOIDToQValueKind(recvOID uint32) qvalue.QValu
return qvalue.QValueKindArrayString
case pgtype.IntervalOID:
return qvalue.QValueKindInterval
case pgtype.TstzrangeOID:
Copy link
Member

Choose a reason for hiding this comment

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

should also handle tsrange at least

@serprex serprex marked this pull request as draft May 7, 2024 22:07
@CLAassistant
Copy link

CLAassistant commented May 21, 2024

CLA assistant check
All committers have signed the CLA.

@serprex
Copy link
Member

serprex commented May 28, 2024

#1733 has merged, making this obsolete

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.

None yet

5 participants