Re: Extensions, this time with a patch

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>, Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>, "David E(dot) Wheeler" <david(at)kineticode(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Extensions, this time with a patch
Date: 2010-10-22 14:30:34
Message-ID: 22006.1287757834@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> Hang on. Did I miss something? Why doesn't the control file name equal
> the extension name? I think the idea that you have to scan the whole
> share directory and parse all control files to find the one you need is
> a bit strange.

Yes. It's horrid for performance, and it's worse for understandability,
and there's no obvious benefit to set against those. Please let's make
the rule that the control file name equals the extension name.

>> It expects the file is in server encoding, but it is not always true
>> because we support multiple encodings in the same installation.
>> How about adding encoding parameter to the function?
>> => pg_execute_from_file( file, encoding )

> This seems sensible ... at least as sensible as it is to allow COPY to
> specify the encoding.

But then you have to figure out what encoding it is, and you have to
know that before you start reading the file. I think a better idea
would be to do the same thing we did for text search config files:
mandate that these files have to be in utf8.

> I think it is OK to have the control files be pure ASCII (this doesn't
> mean they are in SQL_ASCII though). The problems will start when we
> decide to allow translations for extension descriptions. But we can
> leave that for another day.

Well, we can see the issue now, and anyway who's to say an extension
might not want to load up some non-ASCII data?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2010-10-22 14:47:08 Re: Making OFF unreserved
Previous Message Alvaro Herrera 2010-10-22 14:24:22 Re: Extensions, this time with a patch