Re: tables not in list

Поиск
Список
Период
Сортировка
От Lee Keel
Тема Re: tables not in list
Дата
Msg-id 76758090F8686C47A44B6FF52514A1D308C9C6B8@hermes.uai.int
обсуждение исходный текст
Ответ на tables not in list  (Lee Keel <lee.keel@uai.com>)
Список pgsql-general
> -----Original Message-----
> From: Viatcheslav Kalinin [mailto:vka@ipcb.net]
> Sent: Tuesday, July 31, 2007 9:16 AM
> To: Lee Keel
> Cc: pgsql-general@postgresql.org
> Subject: Re: [GENERAL] tables not in list
>
> I usually resolve this as:
> -- this function lets you select from an array
> CREATE OR REPLACE FUNCTION "array_to_set" (vaarray anyarray) RETURNS
> SETOF anyelement AS
> $body$
> BEGIN
>    FOR I IN COALESCE(ARRAY_LOWER(VAARRAY, 1), 1) ..
> COALESCE(ARRAY_UPPER(VAARRAY, 1), 0) LOOP
>        RETURN NEXT VAARRAY[I];
>    END LOOP;
> END
> $body$
> LANGUAGE 'plpgsql';
>
> select table_name
>   from array_to_set(array['test', 'bar', 'foo']) as table_name
>   where table_name not in (select table_name from
> information_schema.tables where table_catalog='postgres' and
> table_type='BASE TABLE' and table_schema='public')
>
> regards

THANKS!  That was exactly what I needed!
This email and any files transmitted with it are confidential and intended solely for the use of the individual or
entityto whom they are addressed. If you have received this email in error please notify the sender. This message
containsconfidential information and is intended only for the individual named. If you are not the named addressee you
shouldnot disseminate, distribute or copy this e-mail. 

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

Предыдущее
От: Viatcheslav Kalinin
Дата:
Сообщение: Re: tables not in list
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Performance problem with large resultsets (byte array 2200)