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

pgcompat: add some missing columns for Metaplane #27155

Merged
merged 2 commits into from
May 18, 2024

Conversation

pH14
Copy link
Contributor

@pH14 pH14 commented May 17, 2024

Motivation

Improvements to our Postgres compatibility story. More context: https://materializeinc.slack.com/archives/C073KLQ0QHM/p1715968613948499

Tips for reviewer

Checklist

@pH14 pH14 changed the title WIP: more pgcompat pgcompat: add in pg_user table + some missing columns May 17, 2024
@benesch benesch marked this pull request as ready for review May 18, 2024 13:15
@benesch benesch requested a review from a team as a code owner May 18, 2024 13:15
@benesch benesch requested a review from maddyblue May 18, 2024 13:15
@benesch benesch changed the title pgcompat: add in pg_user table + some missing columns pgcompat: add some missing columns for Metaplane May 18, 2024
@benesch
Copy link
Member

benesch commented May 18, 2024

I got excited about this. The reltuples and column_default changes looked uncontroversial, so I cleaned them up and marked for automerge. I'll put up a separate PR with the pg_user changes since those look a smidge more delicate.

@benesch benesch enabled auto-merge May 18, 2024 13:20
@benesch benesch merged commit 93e2496 into MaterializeInc:main May 18, 2024
75 of 76 checks passed
benesch added a commit to benesch/materialize that referenced this pull request May 18, 2024
For Metaplane compatibility.

To bring our `pg_user`, `pg_roles`, and `pg_authid` views in line with
PostgreSQL, this commit also refactors how `rolcanlogin` is derived. We
now do something a little gross but that will work well in practice to
derive `rolcanlogin` from whether a role name looks like an email
address, instead of hardcoding `NULL`. This makes the distinction
between `pg_user` and `pg_roles` more useful: the former contains only
the roles  for which `rolcanlogin` is true, while the latter contains
all roles.

Split out from MaterializeInc#27155.

Co-authored-by: Nikhil Benesch <nikhil.benesch@gmail.com>
@benesch benesch mentioned this pull request May 18, 2024
5 tasks
@benesch
Copy link
Member

benesch commented May 18, 2024

I'll put up a separate PR with the pg_user changes since those look a smidge more delicate.

Done in #27161.

benesch added a commit to benesch/materialize that referenced this pull request May 18, 2024
For Metaplane compatibility.

To bring our `pg_user`, `pg_roles`, and `pg_authid` views in line with
PostgreSQL, this commit also refactors how `rolcanlogin` is derived. We
now do something a little gross but that will work well in practice to
derive `rolcanlogin` from whether a role name looks like an email
address, instead of hardcoding `NULL`. This makes the distinction
between `pg_user` and `pg_roles` more useful: the former contains only
the roles  for which `rolcanlogin` is true, while the latter contains
all roles.

Split out from MaterializeInc#27155.

Co-authored-by: Nikhil Benesch <nikhil.benesch@gmail.com>
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

2 participants