Created
April 7, 2009 04:09
-
-
Save posulliv/91094 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
padraig=# \d t1; | |
Table "public.t1" | |
Column | Type | Modifiers | |
--------+------------------------+----------- | |
id | integer | not null | |
text | character varying(255) | not null | |
Indexes: | |
"t1_pkey" PRIMARY KEY, btree (id) | |
padraig=# select * from t1; | |
id | text | |
----+-------------------------- | |
1 | this is the first entry | |
2 | this is the second entry | |
3 | this is the third value | |
(3 rows) | |
padraig=# \d t2; | |
Table "public.t2" | |
Column | Type | Modifiers | |
--------+------------------------+----------- | |
id | integer | | |
text | character varying(255) | not null | |
Foreign-key constraints: | |
"t2_id_fkey" FOREIGN KEY (id) REFERENCES t1(id) | |
padraig=# select * from t2; | |
id | text | |
----+---------------------- | |
1 | this is related to 1 | |
1 | this is related to 1 | |
1 | this is related to 1 | |
3 | this is related to 3 | |
(4 rows) | |
padraig=# |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment