From: | Joe Conway <mail(at)joeconway(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "Hackers (PostgreSQL)" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [Fwd: Re: dblink patches for comment] |
Date: | 2009-06-06 19:23:31 |
Message-ID: | 4A2AC233.90503@joeconway.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane wrote:
> Joe Conway <mail(at)joeconway(dot)com> writes:
>> OK, got it. I think the attached is what you're looking for, although I
>> have not yet tested beyond "it compiles" and "it passes make installcheck".
>
> You're making it vastly overcomplicated. Just do something like
>
> for (cp = str; *cp; cp++)
> {
> if (*cp == '\\' || *cp == '\'')
> AppendStringInfoChar(buf, '\\');
> AppendStringInfoChar(buf, *cp);
> }
>
> Since you're working in a server-safe encoding, there is no need to
> worry about multibyte characters --- the tests will never match
> any byte of a multibyte char.
It wasn't clear to me that would be safe, but thanks for your patience :-)
This version is clearly simpler. For the record I've included the doc
patch again here. Will commit shortly...
Joe
Attachment | Content-Type | Size |
---|---|---|
dblink.2009.06.06.02-sqlmed.diff | text/x-patch | 8.3 KB |
dblink.2009.06.02.02-sqlmed_doc.diff | text/x-patch | 3.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2009-06-06 19:44:50 | Partial vacuum versus pg_class.reltuples |
Previous Message | Josh Berkus | 2009-06-06 19:06:30 | Re: Revisiting default_statistics_target |