mirror of
https://github.com/postgres/postgres.git
synced 2025-07-31 22:04:40 +03:00
pgindent run on all C files. Java run to follow. initdb/regression
tests pass.
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
/* -------------------------------------------------------------------------
|
||||
* pg_dumplo
|
||||
*
|
||||
* $Header: /cvsroot/pgsql/contrib/pg_dumplo/Attic/lo_export.c,v 1.7 2001/03/22 06:16:06 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/contrib/pg_dumplo/Attic/lo_export.c,v 1.8 2001/10/25 05:49:19 momjian Exp $
|
||||
*
|
||||
* Karel Zak 1999-2000
|
||||
* -------------------------------------------------------------------------
|
||||
@ -32,14 +32,14 @@ load_lolist(LODumpMaster * pgLO)
|
||||
int i;
|
||||
int n;
|
||||
|
||||
/*
|
||||
/*
|
||||
* Now find any candidate tables who have columns of type oid.
|
||||
*
|
||||
* NOTE: System tables including pg_largeobject will be ignored.
|
||||
* Otherwise we'd end up dumping all LOs, referenced or not.
|
||||
*
|
||||
* NOTE: the system oid column is ignored, as it has attnum < 1.
|
||||
* This shouldn't matter for correctness, but it saves time.
|
||||
* NOTE: the system oid column is ignored, as it has attnum < 1. This
|
||||
* shouldn't matter for correctness, but it saves time.
|
||||
*/
|
||||
pgLO->res = PQexec(pgLO->conn,
|
||||
"SELECT c.relname, a.attname "
|
||||
@ -107,8 +107,7 @@ pglo_export(LODumpMaster * pgLO)
|
||||
|
||||
for (ll = pgLO->lolist; ll->lo_table != NULL; ll++)
|
||||
{
|
||||
|
||||
/*
|
||||
/*
|
||||
* Query: find the LOs referenced by this column
|
||||
*/
|
||||
sprintf(Qbuff, "SELECT DISTINCT l.loid FROM \"%s\" x, pg_largeobject l WHERE x.\"%s\" = l.loid",
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* -------------------------------------------------------------------------
|
||||
* pg_dumplo
|
||||
*
|
||||
* $Header: /cvsroot/pgsql/contrib/pg_dumplo/Attic/lo_import.c,v 1.5 2001/03/22 06:16:06 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/contrib/pg_dumplo/Attic/lo_import.c,v 1.6 2001/10/25 05:49:19 momjian Exp $
|
||||
*
|
||||
* Karel Zak 1999-2000
|
||||
* -------------------------------------------------------------------------
|
||||
@ -50,7 +50,7 @@ pglo_import(LODumpMaster * pgLO)
|
||||
|
||||
sprintf(lo_path, "%s/%s", pgLO->space, path);
|
||||
|
||||
/*
|
||||
/*
|
||||
* Import LO
|
||||
*/
|
||||
if ((new_oid = lo_import(pgLO->conn, lo_path)) == 0)
|
||||
@ -78,7 +78,7 @@ pglo_import(LODumpMaster * pgLO)
|
||||
|
||||
pgLO->counter++;
|
||||
|
||||
/*
|
||||
/*
|
||||
* UPDATE oid in tab
|
||||
*/
|
||||
sprintf(Qbuff, "UPDATE \"%s\" SET \"%s\"=%u WHERE \"%s\"=%u",
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* -------------------------------------------------------------------------
|
||||
* pg_dumplo
|
||||
*
|
||||
* $Header: /cvsroot/pgsql/contrib/pg_dumplo/Attic/main.c,v 1.8 2001/03/22 06:16:06 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/contrib/pg_dumplo/Attic/main.c,v 1.9 2001/10/25 05:49:19 momjian Exp $
|
||||
*
|
||||
* Karel Zak 1999-2000
|
||||
* -------------------------------------------------------------------------
|
||||
@ -152,7 +152,7 @@ main(int argc, char **argv)
|
||||
exit(RE_ERROR);
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* Check space
|
||||
*/
|
||||
if (!pgLO->space && !pgLO->action == ACTION_SHOW)
|
||||
@ -170,7 +170,7 @@ main(int argc, char **argv)
|
||||
exit(RE_ERROR);
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* Make connection
|
||||
*/
|
||||
pgLO->conn = PQsetdbLogin(pgLO->host, NULL, NULL, NULL, pgLO->db,
|
||||
@ -186,7 +186,7 @@ main(int argc, char **argv)
|
||||
pgLO->user = PQuser(pgLO->conn);
|
||||
|
||||
|
||||
/*
|
||||
/*
|
||||
* Init index file
|
||||
*/
|
||||
if (pgLO->action != ACTION_SHOW)
|
||||
@ -304,7 +304,6 @@ usage()
|
||||
"-q run quietly\n"
|
||||
"-w not dump, but show all LO in DB\n"
|
||||
); /* puts() */
|
||||
|
||||
#endif
|
||||
|
||||
puts(
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* -------------------------------------------------------------------------
|
||||
* pg_dumplo
|
||||
*
|
||||
* $Header: /cvsroot/pgsql/contrib/pg_dumplo/Attic/pg_dumplo.h,v 1.4 2001/03/22 03:59:10 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/contrib/pg_dumplo/Attic/pg_dumplo.h,v 1.5 2001/10/25 05:49:19 momjian Exp $
|
||||
*
|
||||
* Karel Zak 1999-2000
|
||||
* -------------------------------------------------------------------------
|
||||
@ -64,11 +64,11 @@ typedef struct
|
||||
|
||||
typedef enum
|
||||
{
|
||||
ACTION_NONE,
|
||||
ACTION_SHOW,
|
||||
ACTION_EXPORT_ATTR,
|
||||
ACTION_EXPORT_ALL,
|
||||
ACTION_IMPORT
|
||||
ACTION_NONE,
|
||||
ACTION_SHOW,
|
||||
ACTION_EXPORT_ATTR,
|
||||
ACTION_EXPORT_ALL,
|
||||
ACTION_IMPORT
|
||||
} PGLODUMP_ACTIONS;
|
||||
|
||||
extern char *progname;
|
||||
@ -78,5 +78,4 @@ extern void index_file(LODumpMaster * pgLO);
|
||||
extern void load_lolist(LODumpMaster * pgLO);
|
||||
extern void pglo_export(LODumpMaster * pgLO);
|
||||
extern void pglo_import(LODumpMaster * pgLO);
|
||||
|
||||
#endif /* PG_DUMPLO_H */
|
||||
|
Reference in New Issue
Block a user