Re: EXECUTE problem on schema

Поиск
Список
Период
Сортировка
От Ian Barwick
Тема Re: EXECUTE problem on schema
Дата
Msg-id 200303280934.59317.barwick@gmx.net
обсуждение исходный текст
Ответ на Re: EXECUTE problem on schema  ("jack" <datactrl@tpg.com.au>)
Список pgsql-sql
On Friday 28 March 2003 01:59, jack wrote:

(...)
>  And the following are the example.

Aha, the problem is not EXECUTE but QUOTE_IDENT:
 test=# SELECT quote_ident('public.test_j2');    quote_ident     ------------------  "public.test_j2" (1 row)
 test=# SELECT * FROM "public.test_j2"; ERROR:  Relation "public.test_j2" does not exist

which is correct, because schema and relation names can contain periods.
To quote a schema-qualified relation name you need something like
"public"."test_j2" (or "public"."table.with_period_in_name") which
quote_indent can't handle because it doesn't know whether the
period is a schema / relation name divider or part of the relation name.

This has come up before, see:
http://archives.postgresql.org/pgsql-hackers/2002-11/msg00892.php

It would probably be easiest to leave out the quote_ident from your
function definition and do the quoting manually in the function call,
if necessary, which mostly isn't.

Ian Barwick
barwick@gmx.net



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

Предыдущее
От: Popeanga Marian
Дата:
Сообщение: Re: How to configure two netcard for PostgreSQL?
Следующее
От: Peter Childs
Дата:
Сообщение: field defaults