Description of Postgres tables ------------------------------ Currently in "testdb" NB: The "login" columns should have been listed first for all the tables. It doesn't really matter, though, because queries can specify a column order. Output of "psql" tool: \dt List of relations Schema | Name | Type | Owner --------+---------+-------+---------- public | pledges | table | postgres public | users | table | postgres public | wishes | table | postgres public | bids | table | postgres \d users Table "public.users" Column | Type | Modifiers ---------------+------------------------+----------- password_hash | character(32) | first_name | character varying(255) | not null last_name | character varying(255) | not null email | character varying(255) | telephone | character varying(40) | address_1 | character varying(255) | not null address_2 | character varying(255) | city | character varying(255) | not null state | character varying(255) | country | character varying(80) | not null zipcode | character varying(40) | login | character varying(255) | Indexes: "users_login_key" UNIQUE, btree ("login") \d wishes Table "public.wishes" Column | Type | Modifiers ---------+------------------------+----------- symbol | character varying(40) | not null buy | boolean | computed from bids? bid | real | ditto ask | real | ditto last | real | ditto pledges | integer | computed from pledges? payoff | real | ditto login | character varying(255) | not null expiration | timestamp without time zone | add creation timestamp? Indexes: "wishes_pkey" PRIMARY KEY, btree ("login", symbol) Foreign-key constraints: "wishes_login_fkey" FOREIGN KEY ("login") REFERENCES users("login") \d pledges Table "public.pledges" Column | Type | Modifiers ---------+------------------------+----------- symbol | character varying(40) | not null bid | real | ask | real | pledges | integer | payoff | real | login | character varying(255) | not null Indexes: "pledges_pkey" PRIMARY KEY, btree ("login", symbol) Foreign-key constraints: "pledges_login_fkey" FOREIGN KEY ("login") REFERENCES users("login") \d bids Table "public.bids" Column | Type | Modifiers --------------+-----------------------------+----------- login | character varying(80) | not null auction | character varying(80) | not null pledge_price | real | not null pledge_count | integer | not null bidtime | timestamp without time zone | not null Indexes: "bids_pkey" PRIMARY KEY, btree ("login", auction)