Skip site navigation (1) Skip section navigation (2)

Re: Add ENCODING option to COPY

From: Hitoshi Harada <umi(dot)tanuki(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add ENCODING option to COPY
Date: 2011-02-01 04:08:16
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
2011/2/1 Hitoshi Harada <umi(dot)tanuki(at)gmail(dot)com>:
> 2011/2/1 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
>> Hitoshi Harada <umi(dot)tanuki(at)gmail(dot)com> writes:
>>> Finally I concluded the concern Itagaki-san raised can be solved by
>>> adding code that restores client_encoding in copy_in_error_callback.
>> It might happen to work today (or at least in the scenarios you tested),
>> but it seems fragile as can be.
> Although I thought its fragile-ness was acceptable to avoid making the
> patch too complex, I agree with you.
> The third patch is attached, modifying mb routines so that they can
> receive conversion procedures as FmgrInof * and save the function
> pointer in CopyState.
> I tested it with encoding option and could not see performance slowdown.

Hmm, sorry, the patch was wrong. Correct version is attached.


Hitoshi Harada

Attachment: copy_encoding.v4.patch
Description: application/octet-stream (19.2 KB)

In response to


pgsql-hackers by date

Next:From: Pavel StehuleDate: 2011-02-01 04:41:25
Subject: Re: [pgsql-general 2011-1-21:] Are there any projects interested in object functionality? (+ rule bases)
Previous:From: Fujii MasaoDate: 2011-02-01 03:45:27
Subject: Re: Allowing multiple concurrent base backups

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group