Re: replicating DROP commands across servers

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: replicating DROP commands across servers
Дата
Msg-id CA+TgmoY0z+Haa=EONhF-qZW9jBn_MKa9v950c0PcuCJwbEZmyg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: replicating DROP commands across servers  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Ответы Re: replicating DROP commands across servers
Список pgsql-hackers
On Mon, Oct 6, 2014 at 7:03 PM, Jim Nasby <Jim.Nasby@bluetreble.com> wrote:
> On 10/4/14, 8:12 PM, Robert Haas wrote:
>>> >It's just not sane to try to parse such text strings.
>>
>> But this is a pretty ridiculous argument.  We have an existing parser
>> that does it just fine, and a special-purpose parser that does just
>> that (and not all of the other stuff that the main parser does) would
>> be a great deal simpler.  Maybe there are examples other than the ones
>> you listed here that demonstrate that this is actually a hard problem,
>> but the fact that you might need to undo quote_literal() or search for
>> and split on fixed strings does not.
>
>
> FWIW, I've run into situations more than once in userspace where I need a
> way to properly separate schema and object name. Generally I can make do
> using reg* casts and then hitting catalog tables, but it'd be nice if there
> was an easier way.

Sure, although I think that's a bit of a separate problem.  It's hard
to iterate through a string a character at a time from the SQL level
so that you can handle stuff like the quote_literal() rules.  If we
want people to be able to do that easily we need to provide tools to
handle it.  But C is actually quite well-suited to such tasks.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: TAP test breakage on MacOS X
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: Corporate and Individual Contributor License Agreements (CLAs)