On Mon, Dec 6, 2010 at 08:01, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Why is there a variadic replace() in this patch at all? It seems just
> about entirely unrelated to the stated purpose of the patch, as well
> as being of dubious usefulness.
As I wrote in the previous mail, the most important part of the patch
for CREATE EXTENSION is pg_read_binary_file(). We can rewrite not only
replace(VARIADIC) but also other functions in the patch with existing
functions. However, the author wanted simple-case user APIs, and I also
agreed to export each step of the complex pg_execute_sql_file().
But I have no objections to hide some of the subroutines if there are
any problems.
| $sql := replace(
| convert_from(
| pg_read_binary_file($path, 0),
| $encoding),
| '@extschema@', $schema));
| EXECUTE $sql;
--
Itagaki Takahiro