Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)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