Skip to content

Add a create table functions that is separate for the execute function #13

@aylapear

Description

@aylapear

Your Idea

The create_table() function will:

  • open the connection
  • set the role
  • execute the SQL command
  • close the connection

The parameter to set the role will be NULL as default which means the original user is used or the name of the role will be provided and the function will set it to that role.

The difference in this function is the role is set before the SQL command is executed, this will allow new tables that are created to be owned by the set role or the direct user.

This should eliminate the need for the reassign-table-owner-postgres.R script because the tables will already be owned by the data manipulator role instead of by the employee user.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions