On Mar 8, 2012, at 12:20 PM, Andrew Dunstan wrote:

> It works fine if you don't need to do any file conversions (i.e. if you don't 
> have "input" or "output" directories). But file_textarray_fdw does.
> 
> Here's a patch that I think fixes the problem.

While you’re there, an issue I noticed is that the MODULE_PATHNAME 
substitutions do not work if you have your SQL files in a subdirectory. My 
extensions have the .sql files in an sql/ directory. So that means when I have 
something like this in sql/plproxy.sql.in:

    CREATE FUNCTION plproxy_call_handler ()
    RETURNS language_handler AS 'MODULE_PATHNAME' LANGUAGE C;

What I end up with in sql/plproxy.sql is:

    CREATE FUNCTION plproxy_call_handler ()
    RETURNS language_handler AS 'sql/plproxy' LANGUAGE C;

Which doesn’t work at all, because the file is not installed in an `sql` 
subdirectory, it's just that way in my repository (and the distribution 
tarball). So I avoid the whole MODULE_PATHNAME business for now (and the .in 
file) and just do this, instead:

    CREATE FUNCTION plproxy_call_handler ()
    RETURNS language_handler AS 'plproxy' LANGUAGE C;

Which is an okay workaround, but I’m not sure that MODULE_PATHNAME is actually 
working correctly.

Best,

David


-- 
Sent via pgsql-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to