Re: Elementary dependency look-up

Поиск
Список
Период
Сортировка
От decibel
Тема Re: Elementary dependency look-up
Дата
Msg-id E65FD0CE-8EC5-40F4-B384-69AAC85BA2FC@decibel.org
обсуждение исходный текст
Ответ на Re: Elementary dependency look-up  (Greg Smith <gsmith@gregsmith.com>)
Список pgsql-hackers
On Sep 14, 2009, at 1:36 AM, Greg Smith wrote:
>   CASE
>     WHEN c1.relkind='r' THEN 'table'
>     WHEN c1.relkind='i' THEN 'index'
>     WHEN c1.relkind='S' THEN 'sequence'
>     WHEN c1.relkind='v' THEN 'view'
>     WHEN c1.relkind='c' THEN 'composite'
>     WHEN c1.relkind='t' THEN 'TOAST'
>     ELSE '?'
>   END as "kind",


I think part of this patch should be providing a function or  
something that converts things like pg_class.relkind into a useful  
string. I know I've created a function that does that (though, I  
return a cased string, since it's easier to run it through lower than  
to try and case it after the fact). I'm not sure if a function is the  
best way to do this or if a table or view would be better (something  
you could join to). One benefit of a table or view is that you could  
provide both cased and lower versions of the names.
-- 
Decibel!, aka Jim C. Nasby, Database Architect  decibel@decibel.org
Give your computer some brain candy! www.distributed.net Team #1828




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Grzegorz Jaskiewicz
Дата:
Сообщение: Re: Patch for automating partitions in PostgreSQL 8.4 Beta 2
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: RfD: more powerful "any" types