Re: [HACKERS] proposal psql \gdesc
От | Pavel Stehule |
---|---|
Тема | Re: [HACKERS] proposal psql \gdesc |
Дата | |
Msg-id | CAFj8pRDhb30d-Pi7-9oGs4Zs2_UeOYA2u77Ss2L4+KrfBDS7PQ@mail.gmail.com обсуждение исходный текст |
Ответ на | [HACKERS] proposal psql \gdesc (Pavel Stehule <pavel.stehule@gmail.com>) |
Ответы |
Re: [HACKERS] proposal psql \gdesc
Re: [HACKERS] proposal psql \gdesc |
Список | pgsql-hackers |
2017-04-28 6:08 GMT+02:00 Pavel Stehule <pavel.stehule@gmail.com>:
HiSometimes I have to solve the result types of some query. It is invisible in psql. You have to materialize table or you have to create view. Now, when we can enhance \g command, we can introduce query describingsome likeselect a, b from foo\gdesc| type | length | collation | ....------------------------------------------------ a | varchar | 30 |b | numeric | 20 |
here is the patch. It is based on PQdescribePrepared result.
postgres=# select * from pg_proc \gdesc
┌─────────────────┬──────────────┐
│ Name │ Type │
╞═════════════════╪══════════════╡
│ proname │ name │
│ pronamespace │ oid │
│ proowner │ oid │
│ prolang │ oid │
│ procost │ real │
│ prorows │ real │
│ provariadic │ oid │
│ protransform │ regproc │
│ proisagg │ boolean │
│ proiswindow │ boolean │
│ prosecdef │ boolean │
│ proleakproof │ boolean │
│ proisstrict │ boolean │
│ proretset │ boolean │
│ provolatile │ "char" │
│ proparallel │ "char" │
│ pronargs │ smallint │
│ pronargdefaults │ smallint │
│ prorettype │ oid │
│ proargtypes │ oidvector │
│ proallargtypes │ oid[] │
│ proargmodes │ "char"[] │
│ proargnames │ text[] │
│ proargdefaults │ pg_node_tree │
│ protrftypes │ oid[] │
│ prosrc │ text │
│ probin │ text │
│ proconfig │ text[] │
│ proacl │ aclitem[] │
└─────────────────┴──────────────┘
(29 rows)
What do you think about this idea?RegardsPavel
Вложения
В списке pgsql-hackers по дате отправления: