diff --git a/tests/privileges/0_setup.sql b/tests/privileges/0_setup.sql index a6cafdc..7965565 100644 --- a/tests/privileges/0_setup.sql +++ b/tests/privileges/0_setup.sql @@ -25,4 +25,8 @@ SELECT ClassDB.createStudent('ptstu1', 'Student 1'); SELECT ClassDB.createDBManager('ptdbm0', 'DB Manager 0'); SELECT ClassDB.createDBManager('ptdbm1', 'DB Manager 1'); +--Create team for testing access to team resources +SELECT ClassDB.createTeam('ptTeam0', 'Team 0'); + + COMMIT; diff --git a/tests/privileges/1_instructorPass.sql b/tests/privileges/1_instructorPass.sql index ef92a46..3422e57 100644 --- a/tests/privileges/1_instructorPass.sql +++ b/tests/privileges/1_instructorPass.sql @@ -15,21 +15,36 @@ START TRANSACTION; --Execute appropriate ClassDB functions (these tests do not verify correctness -- of each function) -SELECT ClassDB.createStudent('teststu', 'noname'); -SELECT ClassDB.resetPassword('teststu'); -SELECT ClassDB.listUserConnections('teststu'); -SELECT ClassDB.killUserConnections('teststu'); -SELECT ClassDB.dropStudent('teststu', TRUE, TRUE, 'drop_c'); - +SELECT ClassDB.createStudent('teststu_pt', 'testname'); +SELECT ClassDB.resetPassword('teststu_pt'); +SELECT ClassDB.listUserConnections('teststu_pt'); +SELECT ClassDB.killUserConnections('teststu_pt'); +SELECT ClassDB.createTeam('testteam_pt'); +SELECT ClassDB.addToTeam('teststu_pt', 'testteam_pt'); +SELECT ClassDB.removeFromTeam('teststu_pt', 'testteam_pt'); +SELECT ClassDB.revokeTeam('testteam_pt'); +SET LOCAL client_min_messages TO WARNING; +SELECT ClassDB.dropTeam('testteam_pt', TRUE, TRUE, 'drop_c'); +RESET client_min_messages; +SELECT ClassDB.revokeStudent('teststu_pt'); +SET LOCAL client_min_messages TO WARNING; +SELECT ClassDB.dropStudent('teststu_pt', TRUE, TRUE, 'drop_c'); +RESET client_min_messages; --ClassDB.dropAllStudents is not being tested here because it would drop the -- test students that will later be used to connect to the DB --SELECT ClassDB.dropAllStudents(TRUE, TRUE, 'drop_c'); -SELECT ClassDB.createInstructor('testins', 'noname'); -SELECT ClassDB.dropInstructor('testins', TRUE, TRUE, 'drop_c'); +SELECT ClassDB.createInstructor('testins_pt', 'testname'); +SELECT ClassDB.revokeInstructor('testins_pt'); +SET LOCAL client_min_messages TO WARNING; +SELECT ClassDB.dropInstructor('testins_pt', TRUE, TRUE, 'drop_c'); +RESET client_min_messages; -SELECT ClassDB.createDBManager('testman', 'noname'); -SELECT ClassDB.dropDBManager('testman', TRUE, TRUE, 'drop_c'); +SELECT ClassDB.createDBManager('testman_pt', 'noname'); +SELECT ClassDB.revokeDBManager('testman_pt'); +SET LOCAL client_min_messages TO WARNING; +SELECT ClassDB.dropDBManager('testman_pt', TRUE, TRUE, 'drop_c'); +RESET client_min_messages; SELECT ClassDB.importConnectionLog(); @@ -85,6 +100,25 @@ SELECT * FROM ClassDB.DBManager; SELECT * FROM ClassDB.Student; SELECT * FROM ClassDB.Instructor; +--Read from team views +SELECT * FROM ClassDB.TeamMember; +SELECT * FROM ClassDB.Team; + +--Read from frequent views +SELECT * FROM ClassDB.StudentTable; +SELECT * FROM ClassDB.StudentTableCount; +SELECT * FROM ClassDB.StudentActivitySummary; +SELECT * FROM ClassDB.StudentActivitySummaryAnon; +SELECT * FROM ClassDB.StudentActivity; +SELECT * FROM ClassDB.StudentActivityAnon; + +--Read from public frequent views +SELECT * FROM public.myActivitySummary; +SELECT * FROM public.MyDDLActivity; +SELECT * FROM public.MyConnectionActivity; +SELECT * FROM public.myActivity; + + --Update FullName and ExtraInfo in RoleBase table SELECT ClassDB.createStudent('updateInfoTest', 'Temp name', NULL, 'Temp info'); @@ -112,5 +146,8 @@ CREATE TABLE TestInsUsr INSERT INTO testInsUsr VALUES('Read by: ptins0'); +--Add test student 0 to team 0 +SELECT ClassDB.addToTeam('ptstu0', 'ptteam0'); + COMMIT; diff --git a/tests/privileges/2_studentPass.sql b/tests/privileges/2_studentPass.sql index e5874f5..2dc4e8b 100644 --- a/tests/privileges/2_studentPass.sql +++ b/tests/privileges/2_studentPass.sql @@ -25,10 +25,11 @@ SELECT describe('test'); DROP TABLE test; ---Test frequent views access -SELECT * FROM MyActivitySummary; -SELECT * FROM MyDDLActivity; -SELECT * FROM MyConnectionActivity; +--Read from public frequent views +SELECT * FROM public.myActivitySummary; +SELECT * FROM public.MyDDLActivity; +SELECT * FROM public.MyConnectionActivity; +SELECT * FROM public.myActivity; --CRUD on tables created by the student. This table should be placed in their own schema @@ -52,6 +53,51 @@ DELETE FROM test; DROP TABLE test; +--CRUD on tables owned by student in team schema +CREATE TABLE ptteam0.SharedTable +( + col1 VARCHAR(10) +); + +INSERT INTO ptteam0.SharedTable VALUES ('test'); + +SELECT * FROM ptteam0.SharedTable; + +UPDATE ptteam0.SharedTable +SET col1 = 'TEST' +WHERE col1 = 'test'; + +DELETE FROM ptteam0.SharedTable; +DROP TABLE ptteam0.SharedTable; + + +--CRUD on tables owned by team in team schema +CREATE TABLE ptteam0.FirstTeamTable +( + col1 VARCHAR(10) +); +INSERT INTO ptteam0.FirstTeamTable VALUES('test'); + +SELECT * FROM ptteam0.FirstTeamTable; + +UPDATE ptteam0.FirstTeamTable +SET col1 = 'TEST' +WHERE col1 = 'test'; + +DELETE FROM ptTeam0.FirstTeamTable; + +DROP TABLE ptTeam0.FirstTeamTable; + + +--Create table in team schema to test read by instructor, CRUD by other member +CREATE TABLE ptteam0.SharedTable +( + col1 VARCHAR(20) +); + +INSERT INTO ptteam0.SharedTable VALUES ('In Team''s scheama'); + + --Read on tables in the public schema created by Instructor SELECT * FROM testInsPublic; diff --git a/tests/privileges/3_dbmanagerPass.sql b/tests/privileges/3_dbmanagerPass.sql index 512bd02..a435e0b 100644 --- a/tests/privileges/3_dbmanagerPass.sql +++ b/tests/privileges/3_dbmanagerPass.sql @@ -15,21 +15,36 @@ START TRANSACTION; --Execute appropriate ClassDB functions (these tests do not verify correctness -- of each function) -SELECT ClassDB.createStudent('teststu', 'noname'); -SELECT ClassDB.resetPassword('teststu'); -SELECT ClassDB.listUserConnections('teststu'); -SELECT ClassDB.killUserConnections('teststu'); -SELECT ClassDB.dropStudent('teststu', TRUE, TRUE, 'drop_c'); - +SELECT ClassDB.createStudent('teststu_pt', 'testname'); +SELECT ClassDB.resetPassword('teststu_pt'); +SELECT ClassDB.listUserConnections('teststu_pt'); +SELECT ClassDB.killUserConnections('teststu_pt'); +SELECT ClassDB.createTeam('testteam_pt'); +SELECT ClassDB.addToTeam('teststu_pt', 'testteam_pt'); +SELECT ClassDB.removeFromTeam('teststu_pt', 'testteam_pt'); +SELECT ClassDB.revokeTeam('testteam_pt'); +SET LOCAL client_min_messages TO WARNING; +SELECT ClassDB.dropTeam('testteam_pt', TRUE, TRUE, 'drop_c'); +RESET client_min_messages; +SELECT ClassDB.revokeStudent('teststu_pt'); +SET LOCAL client_min_messages TO WARNING; +SELECT ClassDB.dropStudent('teststu_pt', TRUE, TRUE, 'drop_c'); +RESET client_min_messages; --ClassDB.dropAllStudents is not being tested here because it would drop the -- test students that will later be used to connect to the DB --SELECT ClassDB.dropAllStudents(TRUE, TRUE, 'drop_c'); -SELECT ClassDB.createInstructor('testins', 'noname'); -SELECT ClassDB.dropInstructor('testins', TRUE, TRUE, 'drop_c'); +SELECT ClassDB.createInstructor('testins_pt', 'testname'); +SELECT ClassDB.revokeInstructor('testins_pt'); +SET LOCAL client_min_messages TO WARNING; +SELECT ClassDB.dropInstructor('testins_pt', TRUE, TRUE, 'drop_c'); +RESET client_min_messages; -SELECT ClassDB.createDBManager('testman', 'noname'); -SELECT ClassDB.dropDBManager('testman', TRUE, TRUE, 'drop_c'); +SELECT ClassDB.createDBManager('testman_pt', 'noname'); +SELECT ClassDB.revokeDBManager('testman_pt'); +SET LOCAL client_min_messages TO WARNING; +SELECT ClassDB.dropDBManager('testman_pt', TRUE, TRUE, 'drop_c'); +RESET client_min_messages; SELECT ClassDB.importConnectionLog(); @@ -64,6 +79,12 @@ SELECT * FROM ClassDB.DBManager; SELECT * FROM ClassDB.Student; SELECT * FROM ClassDB.Instructor; +--Read from public frequent views +SELECT * FROM public.myActivitySummary; +SELECT * FROM public.MyDDLActivity; +SELECT * FROM public.MyConnectionActivity; +SELECT * FROM public.myActivity; + --Update FullName and ExtraInfo in RoleBase table SELECT ClassDB.createStudent('updateInfoTest', 'Temp name', NULL, 'Temp info'); diff --git a/tests/privileges/4_instructorPass2.sql b/tests/privileges/4_instructorPass2.sql index 2e2a192..2b49590 100644 --- a/tests/privileges/4_instructorPass2.sql +++ b/tests/privileges/4_instructorPass2.sql @@ -27,4 +27,7 @@ SELECT listTables('ptstu0'); SELECT describe('testInsPub', 'public'); SELECT describe('testStuUsr', 'ptstu0'); +--Read shared team table +SELECT * FROM ptteam0.SharedTable; + COMMIT; diff --git a/tests/privileges/5_instructorFail.sql b/tests/privileges/5_instructorFail.sql index cde1e07..d5d1b12 100644 --- a/tests/privileges/5_instructorFail.sql +++ b/tests/privileges/5_instructorFail.sql @@ -45,7 +45,7 @@ WHERE UserName = 'ptstu0'; INSERT INTO ClassDB.ConnectionActivity VALUES ('ptsu0', '2000-01-01 00:00'); UPDATE ClassDB.ConnectionActivity -SET AcceptedAtUTC = '1999-12-31 00:00' +SET ActivityAtUTC = '1999-12-31 00:00' WHERE UserName = 'ptstu0'; DELETE FROM ClassDB.ConnectionActivity @@ -64,6 +64,23 @@ SELECT ClassDB.dropRole('ptstu0'); SELECT ClassDB.logDDLActivity(); SELECT ClassDB.rejectOperation(); +--Not drop ClassDB tables and views +DROP TABLE ClassDB.DDLActivity; +DROP TABLE ClassDB.RoleBase; +DROP VIEW public.MyActivity; +DROP VIEW ClassDB.StudentActivityAnon; +DROP VIEW ClassDB.StudentActivity; +DROP VIEW public.MyConnectionActivity; +DROP VIEW public.MyDDLActivity; +DROP VIEW ClassDB.User; +DROP VIEW ClassDB.Instructor; +DROP VIEW ClassDB.Student; +DROP VIEW ClassDB.DBManager; +DROP VIEW ClassDB.StudentTable; +DROP VIEW ClassDB.StudentTableCount; +DROP VIEW ClassDB.StudentActivitySummary; +DROP VIEW ClassDB.StudentActivitySummaryAnon; + --Not drop ClassDB functions (also covers ALTER and REPLACE) DROP FUNCTION IF EXISTS classdb.cancreatedatabase(ClassDB.IDNameDomain); @@ -138,4 +155,31 @@ DROP FUNCTION IF EXISTS classdb.revokeclassdbrole(ClassDB.IDNameDomain, DROP FUNCTION IF EXISTS classdb.revokedbmanager(ClassDB.IDNameDomain); DROP FUNCTION IF EXISTS classdb.revokeinstructor(ClassDB.IDNameDomain); DROP FUNCTION IF EXISTS classdb.revokestudent(ClassDB.IDNameDomain); +DROP FUNCTION IF EXISTS classdb.createteam(ClassDB.IDNameDomain, + VARCHAR, ClassDB.IDNameDomain, + VARCHAR, BOOLEAN, BOOLEAN); +DROP FUNCTION IF EXISTS classdb.revoketeam(ClassDB.IDNameDomain); +DROP FUNCTION IF EXISTS classdb.dropteam(ClassDB.IDNameDomain, BOOLEAN, BOOLEAN, + VARCHAR, ClassDB.IDNameDomain); +DROP FUNCTION IF EXISTS classdb.dropallteams(BOOLEAN, BOOLEAN, VARCHAR, + ClassDB.IDNameDomain); +DROP FUNCTION IF EXISTS classdb.isteammember(ClassDB.IDNameDomain, + ClassDB.IDNameDomain); +DROP FUNCTION IF EXISTS classdb.addtoteam(ClassDB.IDNameDomain, + ClassDB.IDNameDomain); +DROP FUNCTION IF EXISTS classdb.removefromteam(ClassDB.IDNameDomain, + ClassDB.IDNameDomain); +DROP FUNCTION IF EXISTS classdb.removeallfromteam(ClassDB.IDNameDomain); +DROP FUNCTION IF EXISTS classdb.reassignobjectownership(VARCHAR, VARCHAR, + ClassDB.IDNameDomain); +DROP FUNCTION IF EXISTS classdb.reassignownedinschema(ClassDB.IDNameDomain, + ClassDB.IDNameDomain, + ClassDB.IDNameDomain); +DROP FUNCTION IF EXISTS classdb.isconnectionloggingenabled(); +DROP FUNCTION IF EXISTS classdb.isloggingcollectorenabled(); +DROP FUNCTION IF EXISTS classdb.handledropschemaddlstart(); +DROP FUNCTION IF EXISTS classdb.disallowschemadrop(); +DROP FUNCTION IF EXISTS classdb.allowschemadrop(); +DROP FUNCTION IF EXISTS classdb.isschemadropallowed(); + \ No newline at end of file diff --git a/tests/privileges/6_studentFail.sql b/tests/privileges/6_studentFail.sql index 6114b29..9245fe6 100644 --- a/tests/privileges/6_studentFail.sql +++ b/tests/privileges/6_studentFail.sql @@ -25,25 +25,37 @@ SET col1 = 'Hello'; DELETE FROM public.testInsPublic; +--Not read from team's table +SELECT * FROM ptteam0.SharedTable; ---Not access any objects in classdb schema, should be prevented by not having --- USAGE on the classdb schema anyway -SELECT ClassDB.createUser('testuser', 'password'); -SELECT ClassDB.dropUser('testuser'); - -SELECT ClassDB.createStudent('teststu', 'noname'); -SELECT ClassDB.resetUserPassword('teststu'); -SELECT ClassDB.listUserConnections('teststu'); -SELECT ClassDB.killUserConnections('teststu'); -SELECT ClassDB.dropStudent('teststu'); +--Not create on team's schema +CREATE TABLE ptteam0.StudentTestTable(col1 VARCHAR); -SELECT ClassDB.createInstructor('testins', 'noname'); -SELECT ClassDB.dropInstructor('testins'); -SELECT ClassDB.createDBManager('testman', 'noname'); -SELECT ClassDB.dropDBManager('testman'); +--Not access any objects in classdb schema, should be prevented by not having +-- USAGE on the classdb schema anyway +SELECT ClassDB.createStudent('teststu_pt', 'testname'); +SELECT ClassDB.resetPassword('teststu_pt'); +SELECT ClassDB.listUserConnections('teststu_pt'); +SELECT ClassDB.killUserConnections('teststu_pt'); +SELECT ClassDB.createTeam('testteam_pt'); +SELECT ClassDB.addToTeam('teststu_pt', 'testteam_pt'); +SELECT ClassDB.removeFromTeam('teststu_pt', 'testteam_pt'); +SELECT ClassDB.revokeTeam('testteam_pt'); +SELECT ClassDB.dropTeam('testteam_pt'); +SELECT ClassDB.revokeStudent('teststu_pt'); +SELECT ClassDB.dropStudent('teststu_pt', TRUE, TRUE, 'drop_c'); + +SELECT ClassDB.createInstructor('testins_pt', 'testname'); +SELECT ClassDB.revokeInstructor('testins_pt'); +SELECT ClassDB.dropInstructor('testins_pt', TRUE, TRUE, 'drop_c'); + +SELECT ClassDB.createDBManager('testman_pt', 'noname'); +SELECT ClassDB.revokeDBManager('testman_pt'); +SELECT ClassDB.dropDBManager('testman_pt', TRUE, TRUE, 'drop_c'); + +SELECT ClassDB.importConnectionLog(); -SELECT ClassDB.dropAllStudents(); --Not read Student or Instructor tables (non-access to classdb schema should also prevent this) diff --git a/tests/privileges/7_dbmanagerFail.sql b/tests/privileges/7_dbmanagerFail.sql index fe6b37f..84ccc6f 100644 --- a/tests/privileges/7_dbmanagerFail.sql +++ b/tests/privileges/7_dbmanagerFail.sql @@ -46,7 +46,7 @@ WHERE UserName = 'ptstu0'; INSERT INTO ClassDB.ConnectionActivity VALUES ('ptsu0', '2000-01-01 00:00'); UPDATE ClassDB.ConnectionActivity -SET AcceptedAtUTC = '1999-12-31 00:00' +SET ActivityAtUTC = '1999-12-31 00:00' WHERE UserName = 'ptstu0'; DELETE FROM ClassDB.ConnectionActivity @@ -57,6 +57,9 @@ WHERE UserNAme = 'ptstu0'; SELECT * FROM ptins0.testInsUsr; SELECT * FROM ptdbm0.testDbmUsr; +--Not read from team table +SELECT * FROM ptteam0.sharedTable; + --Not execute internal functions SELECT ClassDB.createRole('testrole', 'Test name', FALSE); @@ -65,6 +68,23 @@ SELECT ClassDB.dropRole('ptstu0'); SELECT ClassDB.logDDLActivity(); SELECT ClassDB.rejectOperation(); +--Not drop ClassDB tables and views +DROP TABLE ClassDB.DDLActivity; +DROP TABLE ClassDB.RoleBase; +DROP VIEW public.MyActivity; +DROP VIEW ClassDB.StudentActivityAnon; +DROP VIEW ClassDB.StudentActivity; +DROP VIEW public.MyConnectionActivity; +DROP VIEW public.MyDDLActivity; +DROP VIEW ClassDB.User; +DROP VIEW ClassDB.Instructor; +DROP VIEW ClassDB.Student; +DROP VIEW ClassDB.DBManager; +DROP VIEW ClassDB.StudentTable; +DROP VIEW ClassDB.StudentTableCount; +DROP VIEW ClassDB.StudentActivitySummary; +DROP VIEW ClassDB.StudentActivitySummaryAnon; + --Not drop ClassDB functions (also covers ALTER and REPLACE) DROP FUNCTION IF EXISTS classdb.cancreatedatabase(ClassDB.IDNameDomain); @@ -139,3 +159,29 @@ DROP FUNCTION IF EXISTS classdb.revokeclassdbrole(ClassDB.IDNameDomain, DROP FUNCTION IF EXISTS classdb.revokedbmanager(ClassDB.IDNameDomain); DROP FUNCTION IF EXISTS classdb.revokeinstructor(ClassDB.IDNameDomain); DROP FUNCTION IF EXISTS classdb.revokestudent(ClassDB.IDNameDomain); +DROP FUNCTION IF EXISTS classdb.createteam(ClassDB.IDNameDomain,VARCHAR, + ClassDB.IDNameDomain, + VARCHAR, BOOLEAN, BOOLEAN); +DROP FUNCTION IF EXISTS classdb.revoketeam(ClassDB.IDNameDomain); +DROP FUNCTION IF EXISTS classdb.dropteam(ClassDB.IDNameDomain, BOOLEAN, BOOLEAN, + VARCHAR, ClassDB.IDNameDomain); +DROP FUNCTION IF EXISTS classdb.dropallteams(BOOLEAN, BOOLEAN, VARCHAR, + ClassDB.IDNameDomain); +DROP FUNCTION IF EXISTS classdb.isteammember(ClassDB.IDNameDomain, + ClassDB.IDNameDomain); +DROP FUNCTION IF EXISTS classdb.addtoteam(ClassDB.IDNameDomain, + ClassDB.IDNameDomain); +DROP FUNCTION IF EXISTS classdb.removefromteam(ClassDB.IDNameDomain, + ClassDB.IDNameDomain); +DROP FUNCTION IF EXISTS classdb.removeallfromteam(ClassDB.IDNameDomain); +DROP FUNCTION IF EXISTS classdb.reassignobjectownership(VARCHAR, VARCHAR, + ClassDB.IDNameDomain); +DROP FUNCTION IF EXISTS classdb.reassignownedinschema(ClassDB.IDNameDomain, + ClassDB.IDNameDomain, + ClassDB.IDNameDomain); +DROP FUNCTION IF EXISTS classdb.isconnectionloggingenabled(); +DROP FUNCTION IF EXISTS classdb.isloggingcollectorenabled(); +DROP FUNCTION IF EXISTS classdb.handledropschemaddlstart(); +DROP FUNCTION IF EXISTS classdb.disallowschemadrop(); +DROP FUNCTION IF EXISTS classdb.allowschemadrop(); +DROP FUNCTION IF EXISTS classdb.isschemadropallowed(); diff --git a/tests/privileges/8_cleanup.sql b/tests/privileges/8_cleanup.sql index 0ab07a0..2564d3d 100644 --- a/tests/privileges/8_cleanup.sql +++ b/tests/privileges/8_cleanup.sql @@ -17,3 +17,4 @@ SELECT ClassDB.dropStudent('ptstu0', TRUE, TRUE, 'drop_c'); SELECT ClassDB.dropStudent('ptstu1', TRUE, TRUE, 'drop_c'); SELECT ClassDB.dropDBManager('ptdbm0', TRUE, TRUE, 'drop_c'); SELECT ClassDB.dropDBManager('ptdbm1', TRUE, TRUE, 'drop_c'); +SELECT Classdb.dropTeam('ptteam0', TRUE, TRUE, 'drop_c'); diff --git a/tests/privileges/runAllPrivilegeTests.psql b/tests/privileges/runAllPrivilegeTests.psql index 1061b4c..f2d7580 100644 --- a/tests/privileges/runAllPrivilegeTests.psql +++ b/tests/privileges/runAllPrivilegeTests.psql @@ -19,12 +19,9 @@ -- to be run, along with having the cleanup process complete \set ON_ERROR_STOP off - ---Remember the current user so we can switch back at the end --- Currently, this is assuming the starting superuser account is 'postgres' --- you must change this if you want to switch back to a different superuser account --- at the end of the script -\set psqlCurrentUser postgres +--Stores the original user the original executing user from psql's :USER +-- environment variable +\set POSTGRES_USER :USER \echo 'The following tests should complete without any errors' @@ -32,15 +29,20 @@ \ir 0_setup.sql +--PGPASSWORD environment variable allows auto-login using the set password +\setenv PGPASSWORD ptins0 \connect - ptins0 \ir 1_instructorPass.sql +\setenv PGPASSWORD ptstu0 \connect - ptstu0 \ir 2_studentPass.sql +\setenv PGPASSWORD ptdbm0 \connect - ptdbm0 \ir 3_dbmanagerPass.sql +\setenv PGPASSWORD ptins1 \connect - ptins1 \ir 4_instructorPass2.sql @@ -50,14 +52,18 @@ \ir 5_instructorFail.sql +\setenv PGPASSWORD ptstu1 \connect - ptstu1 \ir 6_studentFail.sql +\setenv PGPASSWORD ptdbm1 \connect - ptdbm1 \ir 7_dbmanagerFail.sql \echo 'Initiating cleanup' \prompt 'Press enter to continue...' unusedInputVariable -\connect - :psqlCurrentUser +--Reset stored password to allow user to log in with original role +\setenv PGPASSWORD +\connect - :POSTGRES_USER \ir 8_cleanup.sql \ No newline at end of file