extension_sql_file!() { /* proc-macro */ }
Expand description

Declare SQL (from a file) to be included in generated extension script.

Accepts the same options as extension_sql. name is automatically set to the file name (not the full path).

You can declare some SQL without any positioning information, meaning it can end up anywhere in the generated SQL:

use pgx_macros::extension_sql_file;
extension_sql_file!(
    "../static/demo.sql",
);

To override the default name:

use pgx_macros::extension_sql_file;

extension_sql_file!(
    "../static/demo.sql",
    name = "singular",
);

For all other options, and examples of them, see extension_sql.