Skip to content

Instantly share code, notes, and snippets.

@erichanson
Created February 28, 2014 00:18

Revisions

  1. erichanson created this gist Feb 28, 2014.
    41 changes: 41 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,41 @@
    List of relations
    Schema | Name | Type | Owner
    ---------+----------+-------+-------
    sailors | boats | table | eric
    sailors | reserves | table | eric
    sailors | sailors | table | eric



    Table "sailors.sailors"
    Column | Type | Modifiers
    --------+-----------------------+-----------
    sid | integer | not null
    sname | character varying(20) |
    rating | integer |
    age | real |
    Referenced by:
    TABLE "reserves" CONSTRAINT "reserves_sid_fkey" FOREIGN KEY (sid) REFERENCES sailors(sid)


    Table "sailors.reserves"
    Column | Type | Modifiers
    --------+---------+-----------
    sid | integer | not null
    bid | integer | not null
    day | date |

    Foreign-key constraints:
    "reserves_bid_fkey" FOREIGN KEY (bid) REFERENCES boats(bid)
    "reserves_sid_fkey" FOREIGN KEY (sid) REFERENCES sailors(sid)


    Table "sailors.boats"
    Column | Type | Modifiers
    --------+-----------------------+-----------
    bid | integer | not null
    bname | character varying(20) |
    color | character varying(10) |

    Referenced by:
    TABLE "reserves" CONSTRAINT "reserves_bid_fkey" FOREIGN KEY (bid) REFERENCES boats(bid)