pgAdmin Funciton Code - Mailing list pgadmin-support

From kenp
Subject pgAdmin Funciton Code
Date
Msg-id 1164732345.037859.185590@h54g2000cwb.googlegroups.com
Whole thread Raw
Responses Re: pgAdmin Funciton Code
Re: pgAdmin Funciton Code
List pgadmin-support
The code displayed by pgAdmin, for a function I have created, does not
allow me to recreate the function as I would like. If I run :-

CREATE SCHEMA "Security" AUTHORIZATION postgres;

CREATE TABLE "Security"."CentreGroupPolicy"
( "CentreGroupPolicyID" bigint NOT NULL
)
WITHOUT OIDS;

CREATE OR REPLACE FUNCTION
"Security"."CentreGroupPolicyDetailsGet1"(INOUT "pCentreGroupPolicyID"
bigint) AS
$BODY$
BEGIN   SELECT INTO      "pCentreGroupPolicyID"      cgp."CentreGroupPolicyID"   FROM "Security"."CentreGroupPolicy"
cgp  WHERE cgp."CentreGroupPolicyID" = "pCentreGroupPolicyID";
 
END;
$BODY$ LANGUAGE 'plpgsql' STABLE;

Then pgAdmin shows me:-

CREATE OR REPLACE FUNCTION
"Security"."CentreGroupPolicyDetailsGet1"(INOUT pCentreGroupPolicyID
bigint) AS
$BODY$
BEGIN   SELECT INTO      "pCentreGroupPolicyID"      cgp."CentreGroupPolicyID"   FROM "Security"."CentreGroupPolicy"
cgp  WHERE cgp."CentreGroupPolicyID" = "pCentreGroupPolicyID";
 
END;
$BODY$ LANGUAGE 'plpgsql' STABLE;

Which does not run.

If instead I use:-

CREATE OR REPLACE FUNCTION
"Security"."CentreGroupPolicyDetailsGet1"(INOUT pCentreGroupPolicyID
bigint) AS
$BODY$
BEGIN   SELECT INTO      pCentreGroupPolicyID      cgp."CentreGroupPolicyID"   FROM "Security"."CentreGroupPolicy" cgp
WHERE cgp."CentreGroupPolicyID" = pCentreGroupPolicyID;
 
END;
$BODY$ LANGUAGE 'plpgsql' STABLE;

pgAdmin gives me:-

CREATE OR REPLACE FUNCTION
"Security"."CentreGroupPolicyDetailsGet1"(INOUT pcentregrouppolicyid
bigint) AS
$BODY$
BEGIN   SELECT INTO      pCentreGroupPolicyID      cgp."CentreGroupPolicyID"   FROM "Security"."CentreGroupPolicy" cgp
WHERE cgp."CentreGroupPolicyID" = pCentreGroupPolicyID;
 
END;
$BODY$ LANGUAGE 'plpgsql' STABLE;

and the case no longer matches for the parameter.

Is it possible to make it more consistent?



pgadmin-support by date:

Previous
From: Dave Page
Date:
Subject: Re: Treatment of views with associated rules -
Next
From: Dave Page
Date:
Subject: Re: pgAdmin Funciton Code