diff options
| author | Bruce Momjian <bruce@momjian.us> | 2002-10-18 18:41:22 +0000 |
|---|---|---|
| committer | Bruce Momjian <bruce@momjian.us> | 2002-10-18 18:41:22 +0000 |
| commit | aa4c702eac936964649f905741b4a99f4b489200 (patch) | |
| tree | 517d3c28aa3d28eb95b19c8676c940b5cefe2031 /contrib/vacuumlo | |
| parent | fb9bc342fffc157d6ca4b635aeeaccb3c1370b91 (diff) | |
| download | postgresql-aa4c702eac936964649f905741b4a99f4b489200.tar.gz | |
Update /contrib for "autocommit TO 'on'".
Create objects in public schema.
Make spacing/capitalization consistent.
Remove transaction block use for object creation.
Remove unneeded function GRANTs.
Diffstat (limited to 'contrib/vacuumlo')
| -rw-r--r-- | contrib/vacuumlo/vacuumlo.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c index fa2b647f98..b49873c325 100644 --- a/contrib/vacuumlo/vacuumlo.c +++ b/contrib/vacuumlo/vacuumlo.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/contrib/vacuumlo/vacuumlo.c,v 1.16 2002/10/03 17:20:39 momjian Exp $ + * $Header: /cvsroot/pgsql/contrib/vacuumlo/vacuumlo.c,v 1.17 2002/10/18 18:41:21 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -207,6 +207,28 @@ vacuumlo(char *database, struct _param * param) fprintf(stdout, "Test run: no large objects will be removed!\n"); } + res = PQexec(conn, "SET search_path = public"); + if (PQresultStatus(res) != PGRES_COMMAND_OK) + { + fprintf(stderr, "Failed to set search_path on:\n"); + fprintf(stderr, "%s", PQerrorMessage(conn)); + PQclear(res); + PQfinish(conn); + return -1; + } + PQclear(res); + + res = PQexec(conn, "SET autocommit TO 'on'"); + if (PQresultStatus(res) != PGRES_COMMAND_OK) + { + fprintf(stderr, "Failed to set autocommit on:\n"); + fprintf(stderr, "%s", PQerrorMessage(conn)); + PQclear(res); + PQfinish(conn); + return -1; + } + PQclear(res); + /* * First we create and populate the LO temp table */ |
