tablespace.c.diff
text/x-patch
Filename: tablespace.c.diff
Type: text/x-patch
Part: 0
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: unified
| File | + | − |
|---|---|---|
| contrib/pg_upgrade/tablespace.c | 4 | 1 |
diff --git a/contrib/pg_upgrade/tablespace.c b/contrib/pg_upgrade/tablespace.c index 302eb0d..99a97e4 100644 --- a/contrib/pg_upgrade/tablespace.c +++ b/contrib/pg_upgrade/tablespace.c @@ -49,7 +49,10 @@ get_tablespace_paths(migratorContext *ctx) " spcname != 'pg_global'"); ctx->num_tablespaces = ntups = PQntuples(res); - ctx->tablespaces = (char **) pg_malloc(ctx, ntups * sizeof(char *)); + if( ntups > 0 ) + ctx->tablespaces = (char **) pg_malloc(ctx, ntups * sizeof(char *)); + else + ctx->tablespaces=0; i_spclocation = PQfnumber(res, "spclocation"); -- 1.6.3.3