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

Compatibility with non-standard catalogs #706

Open
Medvecrab opened this issue Feb 25, 2025 · 0 comments
Open

Compatibility with non-standard catalogs #706

Medvecrab opened this issue Feb 25, 2025 · 0 comments

Comments

@Medvecrab
Copy link

Hello,

We tried to use our PostgreSQL fork (PostgresPro) with ldap2pg and encountered a problem

We have additional columns in pg_roles view due to implementing extended role model (profiles that impose more limitations on password complexity for example), and ldap2pg has no idea how to interpret them

So I propose a solution - only use vanilla columns when inspecting roles in stage1.go file

Explicitly stating columns of pg_roles will achieve the following:

  • Allow PostgreSQL servers with non-standard (non-vanilla) catalogs to work with ldap2pg
  • This change will also make obvious addtion of new columns to vanilla catalog (however infrequent it may be)

This comes with at least one inconvenience

  • Have to manually check a list of all columns of pg_roles (sometimes when it is needed?)

I've also seen that EDB has some non-vanilla columns in pg_roles too (and those are also related to profiles with password limitations), so the patch could benefit all forks with non-standard catalogs

I've checked output of current SQL queries and proposed SQL queries - it is the same in PostgreSQL 17

I'm open to discussion

A patch is attached

non-standard-catalog.patch

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

No branches or pull requests

1 participant