-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
sql: add and link Postgres type i/o builtins #14529
Conversation
c408897
to
7be5e84
Compare
Woo, so many thanks for tackling this. Reviewed 2 of 5 files at r1, 3 of 3 files at r2. pkg/sql/parser/pg_builtins.go, line 36 at r2 (raw file):
pkg/sql/parser/pg_builtins.go, line 91 at r2 (raw file):
I'd make a function returning a Comments from Reviewable |
7be5e84
to
c4ab43a
Compare
TFTR! Review status: 1 of 5 files reviewed at latest revision, 2 unresolved discussions. pkg/sql/parser/pg_builtins.go, line 36 at r2 (raw file): Previously, knz (kena) wrote…
Done. pkg/sql/parser/pg_builtins.go, line 91 at r2 (raw file): Previously, knz (kena) wrote…
good call. done Comments from Reviewable |
In Postgres, every type has 4 i/o builtins that correspond to it. For int8, for instances, there's int8in, int8out, int8send, and int8recv. We implement these as no-op builtins for ORM compatibility. Additionally, we link these builtins to their corresponding fields in pg_type for all types.
Change the entry in pg_type to say record, not tuple.
c4ab43a
to
31cd331
Compare
Reviewed 2 of 4 files at r3, 3 of 3 files at r4. Comments from Reviewable |
Late to the game, but this is great! Really nice job. Review status: all files reviewed at latest revision, 1 unresolved discussion, all commit checks successful. pkg/sql/pg_catalog.go, line 1462 at r3 (raw file):
nit: Why did this comment get changes? The column is Comments from Reviewable |
In Postgres, every type has 4 i/o builtins that correspond to it. For
int8
, for instance, there'sint8in
,int8out
,int8send
, andint8recv
. We implement these as no-op builtins for ORM compatibility.Additionally, we link these builtins to their corresponding fields in
pg_type
for all types.Also, fix the name in
pg_type
for ourTuple
type, which is calledrecord
in Postgres.Fixes #12526.
This change is