mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixes #1123 - Options other than 'Create' are not available in the
procedure node. This patch also includes other fixes related 'procedure' node as below: * Generate correct statement for dropping procedure. * Fetch the missing schema name for the EXEC script. * Removed the 'DROP CASCADE' menu options, as it is not supported by procedure.
This commit is contained in:
parent
7e51a8fd56
commit
c96f28b66f
@ -1272,6 +1272,12 @@ It may have been removed by another user or moved to another schema.
|
||||
"""
|
||||
resp_data = self._fetch_properties(gid, sid, did, scid, fnid)
|
||||
|
||||
# Fetch the schema name from OID
|
||||
if 'pronamespace' in resp_data:
|
||||
resp_data['pronamespace'] = self._get_schema(
|
||||
resp_data['pronamespace']
|
||||
)
|
||||
|
||||
name = resp_data['pronamespace'] + "." + resp_data['name_with_args']
|
||||
|
||||
# Fetch only arguments
|
||||
|
@ -20,7 +20,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify, Function) {
|
||||
|
||||
// Inherit Functions Node
|
||||
if (!pgBrowser.Nodes['procedure']) {
|
||||
pgAdmin.Browser.Nodes['procedure'] = Function.extend({
|
||||
pgAdmin.Browser.Nodes['procedure'] = pgBrowser.Node.extend({
|
||||
type: 'procedure',
|
||||
sqlAlterHelp: 'sql-alterprocedure.html',
|
||||
sqlCreateHelp: 'sql-createprocedure.html',
|
||||
@ -61,7 +61,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify, Function) {
|
||||
]);
|
||||
},
|
||||
canDrop: pgSchemaNode.canChildDrop,
|
||||
canDropCascade: pgSchemaNode.canChildDrop,
|
||||
canDropCascade: false,
|
||||
model: Function.model.extend({
|
||||
defaults: _.extend({},
|
||||
Function.model.prototype.defaults,
|
||||
|
@ -17,5 +17,5 @@ WHERE
|
||||
{% endif %}
|
||||
|
||||
{% if name %}
|
||||
DROP PROCEDURE {{ conn|qtIdent(nspname, name) }}{{func_args}}{% if cascade %} CASCADE{% endif %};
|
||||
DROP PROCEDURE {{ conn|qtIdent(nspname, name) }};
|
||||
{% endif %}
|
||||
|
@ -17,5 +17,5 @@ WHERE
|
||||
{% endif %}
|
||||
|
||||
{% if name %}
|
||||
DROP PROCEDURE {{ conn|qtIdent(nspname, name) }}{{func_args}}{% if cascade %} CASCADE{% endif %};
|
||||
DROP PROCEDURE {{ conn|qtIdent(nspname, name) }};
|
||||
{% endif %}
|
||||
|
@ -17,5 +17,5 @@ WHERE
|
||||
{% endif %}
|
||||
|
||||
{% if name %}
|
||||
DROP PROCEDURE {{ conn|qtIdent(nspname, name) }}{{func_args}}{% if cascade %} CASCADE{% endif %};
|
||||
DROP PROCEDURE {{ conn|qtIdent(nspname, name) }};
|
||||
{% endif %}
|
||||
|
Loading…
Reference in New Issue
Block a user