Hi,
I would like to write some administration plpgsql scripts that populate some tables (dimension tables) and to execute
themusing psql. I’m not sure that is possible with psql as it is with Oracle sqlplus or SQL Server MSQuery:
Oracle sqlplus:
---------------
DECLARE V_MyObjectID bigint;
BEGIN V_MyObjectID := RegisterMyObject('a string', 'another string'); AddObjectProperty(V_MyObjectID, 'a string');
AddObjectProperty(V_MyObjectID,'another string');
END;
SQL Server MSQuery:
-------------------
DECLARE @MyObjectID int
SET @MyObjectID = RegisterMyObject('a string', 'another string')
EXECUTE AddObjectProperty(MyObjectID, 'a string');
EXECUTE AddObjectProperty(MyObjectID, 'another string');
Any idea how I can translate such a script for psql? I mean, without creating a function that wraps the whole, of
course!:-)
Thanks,
Daniel