In psql:
create table name(id serial primary key, name varchar(12));
create table other_info(id serial primary key, ref integer references name(id));
zygmunt=> \d other_info
Table "public.other_info"
Column | Type | Modifiers
--------+---------+---------------------------------------------------------
id | integer | not null default nextval('other_info_id_seq'::regclass)
ref | integer |
Indexes:
"other_info_pkey" PRIMARY KEY, btree (id)
Foreign-key constraints:
"other_info_ref_fkey" FOREIGN KEY (ref) REFERENCES name(id)
create table name(id serial primary key, name varchar(12));
create table other_info(id serial primary key, ref integer references name(id));
zygmunt=> \d other_info
Table "public.other_info"
Column | Type | Modifiers
--------+---------+---------------------------------------------------------
id | integer | not null default nextval('other_info_id_seq'::regclass)
ref | integer |
Indexes:
"other_info_pkey" PRIMARY KEY, btree (id)
Foreign-key constraints:
"other_info_ref_fkey" FOREIGN KEY (ref) REFERENCES name(id)
To copy to clipboard, switch view to plain text mode
And i need to parse this line:
"other_info_ref_fkey" FOREIGN KEY (ref) REFERENCES name(id)
"other_info_ref_fkey" FOREIGN KEY (ref) REFERENCES name(id)
To copy to clipboard, switch view to plain text mode
How to do it?
Bookmarks