Re: Array detection in pg_dump

Поиск
Список
Период
Сортировка
Искать
От
Bruce Momjian
Тема
Re: Array detection in pg_dump
Дата
Msg-id
200908062319.n76NJR628415@momjian.us
Ответ на
Список
Дерево обсуждения
Array detection in pg_dump Bruce Momjian <bruce@momjian.us>
Re: Array detection in pg_dump Bruce Momjian <bruce@momjian.us>
Re: Array detection in pg_dump Bruce Momjian <bruce@momjian.us>
Re: Array detection in pg_dump Tom Lane <tgl@sss.pgh.pa.us>
Re: Array detection in pg_dump Bruce Momjian <bruce@momjian.us>
Bruce Momjian wrote:
> Is there a reason we don't use pg_type.typcategory to detect arrays in
> Postgres 8.4?  Right now I see this in pg_dump.c:
> 
>     if (g_fout->remoteVersion >= 80300)
>     {
> 	appendPQExpBuffer(query, "SELECT tableoid, oid, typname, "
> 			  "typnamespace, "
> 			  "(%s typowner) AS rolname, "
> 			  "typinput::oid AS typinput, "
> 			  "typoutput::oid AS typoutput, typelem, typrelid, "
> 			  "CASE WHEN typrelid = 0 THEN ' '::\"char\" "
> 			  "ELSE (SELECT relkind FROM pg_class WHERE oid = typrelid) END AS typrelkind, "
> 			  "typtype, typisdefined, "
> 			  "typname[0] = '_' AND typelem != 0 AND "
> -->  "(SELECT typarray FROM pg_type te WHERE oid = pg_type.typelem) = oid AS isarray "
                                     ^^

Oh, and what does that 'te' do?  Seems useless.

--  Bruce Momjian          http://momjian.us EnterpriseDB                             http://enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +

В списке pgsql-hackers по дате отправления
От: Tom Lane
Дата:
Сообщение: Re: Array detection in pg_dump
От: Bruce Momjian
Дата:
Сообщение: Re: Array detection in pg_dump
FAQ