[PATCH] Fix escaping for '\' and '"' in pageinspect for gist - Mailing list pgsql-hackers

From Roman Khapov
Subject [PATCH] Fix escaping for '\' and '"' in pageinspect for gist
Date
Msg-id 96E68E0F-FE4C-4114-92C9-689AC6DF7634@yandex-team.ru
Whole thread Raw
Responses Re: [PATCH] Fix escaping for '\' and '"' in pageinspect for gist
Re: [PATCH] Fix escaping for '\' and '"' in pageinspect for gist
List pgsql-hackers
Hi hackers!

I noticed, that there is bug in escaping values that contains '\' or '"' in text representation
inside pageinspect for gist: the string 'foo"bar' are printed like "foo""bar" and not "foo\"bar".

To fix that, we should do appendStringInfoCharMacro(&buf, '\\'); instead of
appendStringInfoCharMacro(&buf, ch); in case ch is one of that symbols.

Any thoughts?

--
Best regards,
Roman Khapov


Attachment

pgsql-hackers by date:

Previous
From: Roman Khapov
Date:
Subject: Re: TAB completion for ALTER TABLE ... ALTER CONSTRAINT ... ENFORCED
Next
From: Tom Lane
Date:
Subject: Re: Define DatumGetInt8 function.