Fix breakage from recent variable-handling changes.
This commit is contained in:
parent
4d4953fc41
commit
54b38d293e
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright 2000-2002 by PostgreSQL Global Development Group
|
* Copyright 2000-2002 by PostgreSQL Global Development Group
|
||||||
*
|
*
|
||||||
* $Header: /cvsroot/pgsql/src/bin/psql/large_obj.c,v 1.24 2003/03/20 06:43:35 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/bin/psql/large_obj.c,v 1.25 2003/04/18 23:38:47 tgl Exp $
|
||||||
*/
|
*/
|
||||||
#include "postgres_fe.h"
|
#include "postgres_fe.h"
|
||||||
#include "large_obj.h"
|
#include "large_obj.h"
|
||||||
@ -49,10 +49,11 @@ handle_transaction(void)
|
|||||||
"commit",
|
"commit",
|
||||||
NULL))
|
NULL))
|
||||||
{
|
{
|
||||||
case 1:
|
case 1: /* nothing */
|
||||||
return true;
|
return true;
|
||||||
case 2:
|
case 2: /* commit */
|
||||||
commit = true;
|
commit = true;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
notice[0] = '\0';
|
notice[0] = '\0';
|
||||||
@ -94,7 +95,7 @@ do_lo_export(const char *loid_arg, const char *filename_arg)
|
|||||||
int status;
|
int status;
|
||||||
bool own_transaction;
|
bool own_transaction;
|
||||||
|
|
||||||
own_transaction = VariableEquals(pset.vars, "LO_TRANSACTION", "nothing");
|
own_transaction = !VariableEquals(pset.vars, "LO_TRANSACTION", "nothing");
|
||||||
|
|
||||||
if (!pset.db)
|
if (!pset.db)
|
||||||
{
|
{
|
||||||
@ -159,7 +160,7 @@ do_lo_import(const char *filename_arg, const char *comment_arg)
|
|||||||
unsigned int i;
|
unsigned int i;
|
||||||
bool own_transaction;
|
bool own_transaction;
|
||||||
|
|
||||||
own_transaction = VariableEquals(pset.vars, "LO_TRANSACTION", "nothing");
|
own_transaction = !VariableEquals(pset.vars, "LO_TRANSACTION", "nothing");
|
||||||
|
|
||||||
if (!pset.db)
|
if (!pset.db)
|
||||||
{
|
{
|
||||||
@ -272,10 +273,9 @@ do_lo_unlink(const char *loid_arg)
|
|||||||
int status;
|
int status;
|
||||||
Oid loid = atooid(loid_arg);
|
Oid loid = atooid(loid_arg);
|
||||||
char buf[256];
|
char buf[256];
|
||||||
|
|
||||||
bool own_transaction;
|
bool own_transaction;
|
||||||
|
|
||||||
own_transaction = VariableEquals(pset.vars, "LO_TRANSACTION", "nothing");
|
own_transaction = !VariableEquals(pset.vars, "LO_TRANSACTION", "nothing");
|
||||||
|
|
||||||
if (!pset.db)
|
if (!pset.db)
|
||||||
{
|
{
|
||||||
@ -311,7 +311,8 @@ do_lo_unlink(const char *loid_arg)
|
|||||||
/* XXX ought to replace this with some kind of COMMENT command */
|
/* XXX ought to replace this with some kind of COMMENT command */
|
||||||
if (pset.issuper)
|
if (pset.issuper)
|
||||||
{
|
{
|
||||||
sprintf(buf, "DELETE FROM pg_catalog.pg_description WHERE objoid = '%u' "
|
snprintf(buf, sizeof(buf),
|
||||||
|
"DELETE FROM pg_catalog.pg_description WHERE objoid = '%u' "
|
||||||
"AND classoid = 'pg_catalog.pg_largeobject'::regclass",
|
"AND classoid = 'pg_catalog.pg_largeobject'::regclass",
|
||||||
loid);
|
loid);
|
||||||
if (!(res = PSQLexec(buf, false)))
|
if (!(res = PSQLexec(buf, false)))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user