Re: quote_ident and schemas (was Re: connectby with schema)
| От | Tom Lane |
|---|---|
| Тема | Re: quote_ident and schemas (was Re: connectby with schema) |
| Дата | |
| Msg-id | 26212.1037992534@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: quote_ident and schemas (was Re: connectby with schema) (Joe Conway <mail@joeconway.com>) |
| Список | pgsql-hackers |
Joe Conway <mail@joeconway.com> writes:
> Joe Conway wrote:
>> Is quote_ident_required incorrectly dealing with schemas?
> Sorry to reply to myself, but another related question; shouldn't the
> following produce "Ms"."Test"?
> test=# select quote_ident('Ms.Test');
> quote_ident
> -------------
> "Ms.Test"
> (1 row)
No, it should not. If it did, it would fail to cope with tablenames
containing dots.
Since connectby takes a string parameter (correct?) for the table name,
my advice would be to have it not do quote_ident, but instead expect the
user to include double quotes in the string value if dealing with
mixed-case names. Compare the behavior of nextval() for example:
regression=# select nextval('Foo.Bar');
ERROR: Namespace "foo" does not exist
regression=# select nextval('"Foo"."Bar"');
ERROR: Namespace "Foo" does not exist
regression=# select nextval('"Foo.Bar"');
ERROR: Relation "Foo.Bar" does not exist
regards, tom lane
В списке pgsql-hackers по дате отправления: