Re: regclass error reports improperly downcased

Поиск
Список
Период
Сортировка
От Jim Nasby
Тема Re: regclass error reports improperly downcased
Дата
Msg-id 52812450.4070307@enova.com
обсуждение исходный текст
Ответ на Re: regclass error reports improperly downcased  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: regclass error reports improperly downcased  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 11/8/13 2:21 PM, Tom Lane wrote:
> Jim Nasby <jnasby@enova.com> writes:
>> Ahh, duh. Hrm... I ran across this because someone here got confused by this:
>
>> SELECT pg_total_relation_size( schema_name || '.' || relname ) FROM pg_stat_all_tables
>> ERROR: relation "moo" does not exist
>
> Personally I'd do that like
>
>        select pg_total_relation_size(oid) from pg_class where ...
>
> and avoid fooling with regclass conversion at all.

Yeah, that's what I did in this case. I'm just trying to make it more obvious to users that make this mistake.

Is anyone opposed to some kind of hint?
-- 
Jim Nasby, Lead Data Architect   (512) 569-9461



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Add %z support to elog/ereport?
Следующее
От: Andres Freund
Дата:
Сообщение: Re: better atomics - spinlock fallback?