Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 514a731

Browse files
committed
Simplify static function in extension.c
An extra argument for the filename defining the extension script location was present, aimed at being used for error reporting, but has never been used. This was around since extensions have been added in d9572c4. Author: Yugo Nagata Reviewed-by: Tatsuo Ishii Discussion: https://postgr.es/m/20180907180504.1ff19e1675bb44a67e9c7ab1@sraoss.co.jp
1 parent e5f1bb9 commit 514a731

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/backend/commands/extension.c

+2-4
Original file line numberDiff line numberDiff line change
@@ -683,8 +683,6 @@ read_extension_script_file(const ExtensionControlFile *control,
683683
/*
684684
* Execute given SQL string.
685685
*
686-
* filename is used only to report errors.
687-
*
688686
* Note: it's tempting to just use SPI to execute the string, but that does
689687
* not work very well. The really serious problem is that SPI will parse,
690688
* analyze, and plan the whole string before executing any of it; of course
@@ -694,7 +692,7 @@ read_extension_script_file(const ExtensionControlFile *control,
694692
* could be very long.
695693
*/
696694
static void
697-
execute_sql_string(const char *sql, const char *filename)
695+
execute_sql_string(const char *sql)
698696
{
699697
List *raw_parsetree_list;
700698
DestReceiver *dest;
@@ -921,7 +919,7 @@ execute_extension_script(Oid extensionOid, ExtensionControlFile *control,
921919
/* And now back to C string */
922920
c_sql = text_to_cstring(DatumGetTextPP(t_sql));
923921

924-
execute_sql_string(c_sql, filename);
922+
execute_sql_string(c_sql);
925923
}
926924
PG_CATCH();
927925
{

0 commit comments

Comments
 (0)