From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com> |
Cc: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, "Brightwell, Adam" <adam(dot)brightwell(at)crunchydatasolutions(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: replicating DROP commands across servers |
Date: | 2014-10-07 04:24:05 |
Message-ID: | CA+TgmoY0z+Haa=EONhF-qZW9jBn_MKa9v950c0PcuCJwbEZmyg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Oct 6, 2014 at 7:03 PM, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Craig Ringer | 2014-10-07 04:56:50 | Re: Corporate and Individual Contributor License Agreements (CLAs) |
Previous Message | Tom Lane | 2014-10-07 04:15:08 | Re: TAP test breakage on MacOS X |