Re: [HACKERS] outfuncs.c utility statement support - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] outfuncs.c utility statement support
Date
Msg-id 26931.1497795296@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] outfuncs.c utility statement support  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: [HACKERS] outfuncs.c utility statement support  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-hackers
Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
> An empty token produces "<>", so just debackslashing wouldn't work.

pg_strtok recognizes "<>" and returns length = 0, so debackslash()
would produce the right answer AFAICS (admittedly, I haven't tested).
But I don't really want to do it like that because of the wasted
palloc space and cycles.

> Maybe
> local_node->fldname = length ? token[0] : '\0';
> ?

Doesn't cope with backslash-quoted characters.  If we're going to bother
to do anything here, I think we ought to make it reversible for all
possible characters.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [HACKERS] Decimal64 and Decimal128
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Decimal64 and Decimal128