Re: moving FE->BE encoding conversion - Mailing list pgsql-hackers

From Tom Lane
Subject Re: moving FE->BE encoding conversion
Date
Msg-id 15136.1028727893@sss.pgh.pa.us
Whole thread Raw
In response to moving FE->BE encoding conversion  (Tatsuo Ishii <t-ishii@sra.co.jp>)
Responses Re: moving FE->BE encoding conversion  (Tatsuo Ishii <t-ishii@sra.co.jp>)
List pgsql-hackers
Tatsuo Ishii <t-ishii@sra.co.jp> writes:
> Since the encoding conversion now looks up database, it must be
> done within a transaction.

I still think that this is a fundamentally unworkable design.  How will
you deal with reporting errors outside a transaction, or for that matter
inside an already-failed transaction?

ISTM the conversion function *must* be kept as a persistent state
variable, with an initial default of "no conversion", and the actual
setting done via a SET command (which can do the lookup inside a
transaction).  Then you can use the current conversion function without
any assumptions about transaction state.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Hannu Krosing
Date:
Subject: Re: Why is MySQL more chosen over PostgreSQL?
Next
From: Hannu Krosing
Date:
Subject: Re: CLUSTER and indisclustered