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

postgresql_tables regexp does not work (anymore?) as it should #397

Open
jyriok opened this issue Jan 29, 2024 · 0 comments
Open

postgresql_tables regexp does not work (anymore?) as it should #397

jyriok opened this issue Jan 29, 2024 · 0 comments

Comments

@jyriok
Copy link

jyriok commented Jan 29, 2024

Hi there,

Terraform Version

Terraform v1.5.5
on linux_arm64
with latest terraform-provider-postgresql stable version

Affected Resource(s)

  • postgresql_tables

Terraform Configuration Files

data "postgresql_tables" "test" {
  database = var.database_db_name                                                                                                                                                                                                                                                       
  schemas = ["public"]
  like_any_patterns = ["%_%"]
}

Panic Output

If Terraform produced a panic, please provide a link to a GitHub Gist containing the output of the crash.log.

Expected Behavior

I expect to have the list of application tables (I have 5) in the "public" schema containing "_" in their names.

Actual Behavior

I have in return a list of tables containing "_" but none from my "public" schema, but will list the tables from the "pg_catalog" schema while in the provider it is clearly indicated not to take them:

WHERE schema_name NOT LIKE 'pg_%'

https://github.com/cyrilgdn/terraform-provider-postgresql/blob/a961e75c59b360f901020c612deef1e1da8ecfea/postgresql/data_source_postgresql_schemas.go#L19C1-L19C35

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