Skip to content

Instantly share code, notes, and snippets.

@donigian
Created July 1, 2015 14:39
Show Gist options
  • Save donigian/18fc8a9d04b02dfeba91 to your computer and use it in GitHub Desktop.
Save donigian/18fc8a9d04b02dfeba91 to your computer and use it in GitHub Desktop.
RedShift
Setup Database
create database [db-name];
revoke all on schema public from public;
create schema [schema-name];
create table [schema-name].[table-name](
...
)
Create Read-only User
create user [user-name] password '[password]';
grant usage on schema [schema-name] to [user-name];
alter user [user-name] set search_path to [schema-name];
grant select on table [schema-name].[table-name] to [user-name];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment