Closed zipperer closed 7 months ago
For this meeting Andrew made these files:
To make postgres_script.txt
, Andrew:
postgres_plan_revised.txt
During this meeting, we noticed that some of the columns in the mailing_list
table are not varchar
. So, we will:
CREATE TABLE
statement from
CREATE TABLE mailing_list (
column1 VARCHAR,
...
columnN VARCHAR
);
to a statement with improved types.
To go from all varchar
to improved types may take a few steps and involve encountering errors when values do not match the type we propose for a column.
During this meeting, we noticed that the listenerid
column in the mailing_list
table is a custom identifier. The custom identifier uses first initial, last initial, abbreviation for state / geography, and possibly other information. We will add another column to use as an identifier. For now call the new column listenerid_new
. For column listenerid
we will use a unique integer that increments automatically -- i.e. for postgres a SERIAL
.
I will make a plan for this in #6 .
Tables other than mailing_list
use listenerid
values to refer to rows in mailing_list
. After we have column listenerid_new
, we will use values from listenerid_new
to refer to rows in mailing_list
.
I will make a plan for this in #7.
Andrew and Michael meet to:
psql
to execute commands in postgres clusterCREATE DATABASE
CREATE TABLE
INSERT INTO
ALTER TABLE my_table ADD COLUMN my_column
\copy my_table FROM 'example.csv' WITH (FORMAT CSV, DELIMITER ',', HEADER)