Re: pg_execute_from_file, patch v10

Itagaki Takahiro <itagaki.takahiro@gmail.com>

From: Itagaki Takahiro <itagaki.takahiro@gmail.com>
To: Dimitri Fontaine <dimitri@2ndquadrant.fr>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Robert Haas <robertmhaas@gmail.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2010-12-14T23:59:42Z
Lists: pgsql-hackers
On Wed, Dec 15, 2010 at 04:39, Dimitri Fontaine <dimitri@2ndquadrant.fr> wrote:
> Well, in fact, the extension's code is using either execute_sql_file()
> or read_text_file_with_endoding() then @extschema@ replacement then
> execute_sql_string(), all those functions called directly thanks to
> #include "utils/genfile.h". No DirectFunctionCall'ing, we can easily
> remove SQL callable forms.
>
> So what we need is 2, 3 and 4 (because 4 builds on 2).

No, 3 is not needed. You can use SPI_exec() directly instead of
exporting execute_sql_string().

-- 
Itagaki Takahiro