Re: quoting psql varible as identifier

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: quoting psql varible as identifier
Date: 2010-01-04 14:59:48
Message-ID: 10143.1262617188@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
> I have one question. If I understand well, the function fmtId isn't
> multibyte safe? So why is possible to use it in pg_dump?

pg_dump is only guaranteed to work correctly in the server encoding.
If you force it to use a client_encoding different from the server's,
it might or might not work, for reasons far beyond that one --- the
big problem usually is data containing characters that have no
equivalent in the client encoding. So I'm not particularly excited
about whether fmtId is multibyte safe within pg_dump. If we were to try
to use it in more general contexts, it would probably need more work.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-01-04 15:11:24 Re: invalid UTF-8 via pl/perl
Previous Message Alvaro Herrera 2010-01-04 14:50:21 Re: pgsql: When estimating the selectivity of an inequality "column >