createSql test + postgre FIX

This commit is contained in:
Jan Prochazka
2021-05-27 15:46:21 +02:00
parent 8896260df7
commit 73d8ad36ad
6 changed files with 33 additions and 10 deletions

View File

@@ -114,6 +114,7 @@ class Analyser extends DatabaseAnalyser {
objectId: `procedures:${proc.schema_name}.${proc.pure_name}`,
pureName: proc.pure_name,
schemaName: proc.schema_name,
createSql: `CREATE PROCEDURE "${proc.schema_name}"."${proc.pure_name}"() LANGUAGE ${proc.language}\nAS\n$$\n${proc.definition}\n$$`,
contentHash: proc.hash_code,
})),
functions: routines.rows

View File

@@ -2,9 +2,10 @@ module.exports = `
select
routine_name as "pure_name",
routine_schema as "schema_name",
routine_definition as "create_sql",
routine_definition as "definition",
md5(routine_definition) as "hash_code",
routine_type as "object_type"
routine_type as "object_type",
external_language as "language"
from
information_schema.routines where routine_schema != 'information_schema' and routine_schema != 'pg_catalog'
and (