Skip to content

Commit d665ed5

Browse files
committed
Wrap some long queries.
1 parent 98ffcb6 commit d665ed5

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

src/bin/pg_dump/pg_dump.c

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* by PostgreSQL
1313
*
1414
* IDENTIFICATION
15-
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.520 2009/02/16 22:50:41 momjian Exp $
15+
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.521 2009/02/16 23:06:55 momjian Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -4652,8 +4652,10 @@ getTableAttrs(TableInfo *tblinfo, int numTables)
46524652
if (g_fout->remoteVersion >= 70300)
46534653
{
46544654
/* need left join here to not fail on dropped columns ... */
4655-
appendPQExpBuffer(q, "SELECT a.attnum, a.attname, a.atttypmod, a.attstattarget, a.attstorage, t.typstorage, "
4656-
"a.attnotnull, a.atthasdef, a.attisdropped, a.attislocal, "
4655+
appendPQExpBuffer(q, "SELECT a.attnum, a.attname, a.atttypmod, "
4656+
"a.attstattarget, a.attstorage, t.typstorage, "
4657+
"a.attnotnull, a.atthasdef, a.attisdropped, "
4658+
"a.attislocal, "
46574659
"pg_catalog.format_type(t.oid,a.atttypmod) AS atttypname "
46584660
"FROM pg_catalog.pg_attribute a LEFT JOIN pg_catalog.pg_type t "
46594661
"ON a.atttypid = t.oid "
@@ -4669,8 +4671,10 @@ getTableAttrs(TableInfo *tblinfo, int numTables)
46694671
* we don't dump it because we can't tell whether it's been
46704672
* explicitly set or was just a default.
46714673
*/
4672-
appendPQExpBuffer(q, "SELECT a.attnum, a.attname, a.atttypmod, -1 AS attstattarget, a.attstorage, t.typstorage, "
4673-
"a.attnotnull, a.atthasdef, false AS attisdropped, false AS attislocal, "
4674+
appendPQExpBuffer(q, "SELECT a.attnum, a.attname, "
4675+
"a.atttypmod, -1 AS attstattarget, a.attstorage, "
4676+
"t.typstorage, a.attnotnull, a.atthasdef, "
4677+
"false AS attisdropped, false AS attislocal, "
46744678
"format_type(t.oid,a.atttypmod) AS atttypname "
46754679
"FROM pg_attribute a LEFT JOIN pg_type t "
46764680
"ON a.atttypid = t.oid "
@@ -4682,8 +4686,11 @@ getTableAttrs(TableInfo *tblinfo, int numTables)
46824686
else
46834687
{
46844688
/* format_type not available before 7.1 */
4685-
appendPQExpBuffer(q, "SELECT attnum, attname, atttypmod, -1 AS attstattarget, attstorage, attstorage AS typstorage, "
4686-
"attnotnull, atthasdef, false AS attisdropped, false AS attislocal, "
4689+
appendPQExpBuffer(q, "SELECT attnum, attname, atttypmod, "
4690+
"-1 AS attstattarget, attstorage, "
4691+
"attstorage AS typstorage, "
4692+
"attnotnull, atthasdef, false AS attisdropped, "
4693+
"false AS attislocal, "
46874694
"(SELECT typname FROM pg_type WHERE oid = atttypid) AS atttypname "
46884695
"FROM pg_attribute a "
46894696
"WHERE attrelid = '%u'::oid "

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy