Skip to content

Commit 0a73fa8

Browse files
committed
add initialization example script
1 parent de57186 commit 0a73fa8

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
cat <<EOF | psql
3+
create database quotes;
4+
\c quotes
5+
create table quotes ( id serial primary key, speaker varchar(30), quote varchar(200) );
6+
insert into quotes (speaker, quote) values ( 'Groucho', 'Outside of a dog, a book is man''s best friend. Inside of a dog, it''s too dark to read.' );
7+
insert into quotes (speaker, quote) values ( 'Groucho', 'From the moment I picked up your book until I laid it down, I was convulsed with laughter.
8+
Some day I intend reading it.' );
9+
insert into quotes (speaker, quote) values ( 'Groucho', 'Go, and never darken my towels again.' );
10+
insert into quotes (speaker, quote) values ( 'Groucho', 'Those are my principles, and if you don''t like them... well, I have others.' );
11+
insert into quotes (speaker, quote) values ( 'Harpo', 'honk, honk' );
12+
insert into quotes (speaker, quote) values ( 'Chico', 'Come get your ice-cream! Come get your tootsie-frootsie ice cream!' );
13+
insert into quotes (speaker, quote) values ( 'Groucho', 'Captain Yard of the Scotland Spalding' );
14+
insert into quotes (speaker, quote) values ( 'Chico', 'Who are you going to believe, me or your own eyes?' );
15+
insert into quotes (speaker, quote) values ( 'Groucho', 'Thats no way to go into a speakeasy thats the way to go out' );
16+
grant select, insert, update, delete on all tables in schema public to public;
17+
grant all on all sequences in schema public to public;
18+
EOF

0 commit comments

Comments
 (0)