Re: [GENERAL] PL/pgSQL syntax/usage question

Поиск
Список
Период
Сортировка
От Ed Loehr
Тема Re: [GENERAL] PL/pgSQL syntax/usage question
Дата
Msg-id 38985E7C.FB69801B@austin.rr.com
обсуждение исходный текст
Ответ на PL/pgSQL syntax/usage question  (Henk van Lingen <henkvl@cs.uu.nl>)
Список pgsql-general
Adriaan Joubert wrote:
>
> >
> > Second, IIRC, you cannot pass in a string representing the tablename
> > and then use it as a tablename in the select (though it would be quite
> > handy).  Not sure how to do it, though.
>
> I went through this a while ago: no way to pass a table name in. Only possibility
> is to write a C routine using SPI and then anything is possible.

It occurs to me that you might be able to weave something together by
looking up the tablename in the pg_class or pg_tables system tables
and then building some sort of select query using the relation ID to
get into the table.  Haven't tried it, don't know if it could work,
but there's an idea for the truly desperate.

Cheers,
Ed Loehr

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

Предыдущее
От: Nicolas Huillard
Дата:
Сообщение: RE: [GENERAL] Rebuilding 6.5.3 RPMs
Следующее
От: Bertrand Bourdon
Дата:
Сообщение: ...