Skip to content

postgresql_database search_path #434

@OJFord

Description

@OJFord

[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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions