forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit1ac7db4
committed
I can't remember who said they were working on schema related psql
changes, but I kept finding myself wishing I could see what schema atable or view exists in when I use \dt, \dv, etc. So, here is a patchwhich does just that.It sorts on "Schema" first, and "Name" second.It also changes the test for system objects to key off the namespacename starting with 'pg_' instead of the object name.Sample output:test=# create schema testschema;CREATE SCHEMAtest=# create view testschema.ts_view as select 1;CREATE VIEWtest=# \dv List of relations Name | Schema | Type | Owner--------------------+------------+------+---------- __testpassbyval | public | view | postgres fooview | public | view | postgres master_pg_proc | public | view | postgres rmt_pg_proc | public | view | postgres vw_dblink_get_pkey | public | view | postgres vw_dblink_replace | public | view | postgres ts_view | testschema | view | postgres(7 rows)Joe Conway1 parent1ce0360 commit1ac7db4
1 file changed
+11
-8
lines changedLines changed: 11 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
6 |
| - | |
| 6 | + | |
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
| |||
1022 | 1022 |
| |
1023 | 1023 |
| |
1024 | 1024 |
| |
| 1025 | + | |
1025 | 1026 |
| |
1026 | 1027 |
| |
1027 |
| - | |
| 1028 | + | |
1028 | 1029 |
| |
1029 | 1030 |
| |
1030 | 1031 |
| |
| |||
1034 | 1035 |
| |
1035 | 1036 |
| |
1036 | 1037 |
| |
1037 |
| - | |
| 1038 | + | |
1038 | 1039 |
| |
| 1040 | + | |
1039 | 1041 |
| |
1040 | 1042 |
| |
1041 | 1043 |
| |
1042 | 1044 |
| |
1043 |
| - | |
1044 |
| - | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
1045 | 1048 |
| |
1046 | 1049 |
| |
1047 | 1050 |
| |
| |||
1058 | 1061 |
| |
1059 | 1062 |
| |
1060 | 1063 |
| |
1061 |
| - | |
| 1064 | + | |
1062 | 1065 |
| |
1063 |
| - | |
| 1066 | + | |
1064 | 1067 |
| |
1065 | 1068 |
| |
1066 | 1069 |
| |
1067 | 1070 |
| |
1068 |
| - | |
| 1071 | + | |
1069 | 1072 |
| |
1070 | 1073 |
| |
1071 | 1074 |
| |
|
0 commit comments
Comments
(0)