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_database search_path #434

Open
OJFord opened this issue Apr 26, 2024 · 1 comment
Open

postgresql_database search_path #434

OJFord opened this issue Apr 26, 2024 · 1 comment

Comments

@OJFord
Copy link

OJFord commented Apr 26, 2024

[Removed the template because not a bug]

Currently it doesn't seem to be possible to set the database-level search_path on the postgresql_database resource; it's necessary to create the resource and then connect and ALTER DATABASE dbname SET search_path TO schema1,schema2,schema3; some other way afterwards.

It would be good to have a list(string) argument on postgresql_database to set this instead:

resource "postgresql_database" "db" {
  name = "dbname"
  owner = "me"
  search_path = [
    "\"$user\"",
    "public",
    "myadditionalschema",
  ]
}

Hope to have a PR shortly.

@OJFord
Copy link
Author

OJFord commented Apr 26, 2024

Hope to have a PR shortly.

Actually, sorry, but since I just found it is supported on the role I can do it like that for now. I might still get around to it though 🙂

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