在我看来,这里有一个例程表和一个表创建脚本,我已经把它放在了 /tmp/try.sql 中。我在 OSX 10.10.2 下运行 postgres。
这是表:
cow_dev=# \d carc
Table "public.carc"
Column | Type | Modifiers
---------------+--------------+--------------------------------------------------- ---------
internal_id | integer | not null default nextval('carc_internal_id_seq'::regclass)
acct_nbr | character(6) |
birth_date | date |
anm_key | integer |
slghtr_dt | date |
sire_assoc_id | integer |
sire_reg | text |
dam_assoc_id | integer |
dam_reg | text |
sex | text |
carc_kphf_pct | real |
carc_wt | integer |
marbling | integer |
ribeye_area | real | …
Run Code Online (Sandbox Code Playgroud) postgresql ×1