Thread: %x, %g warnings
The attached keeps them from appearing. It needs to be tested to ensure it still does what is expected. -- Rod Taylor <rbt@rbt.ca> PGP Key: http://www.rbt.ca/rbtpub.asc
Attachment
On Tue, Jun 24, 2003 at 11:07:56PM -0400, Rod Taylor wrote: > The attached keeps them from appearing. > Good idea. :-) Patch applied. Michael -- Michael Meskes Email: Michael at Fam-Meskes dot De ICQ: 179140304, AIM: michaelmeskes, Jabber: meskes@jabber.org Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!
Your patch has been added to the PostgreSQL unapplied patches list at: http://momjian.postgresql.org/cgi-bin/pgpatches I will try to apply it within the next 48 hours. --------------------------------------------------------------------------- Rod Taylor wrote: -- Start of PGP signed section. > The attached keeps them from appearing. > > It needs to be tested to ensure it still does what is expected. > -- > Rod Taylor <rbt@rbt.ca> > > PGP Key: http://www.rbt.ca/rbtpub.asc [ Attachment, skipping... ] -- End of PGP section, PGP failed! -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073
Sorry. I see this was already applied as part of this commit: revision 1.6 date: 2003/06/25 10:44:21; author: meskes; state: Exp; lines: +24 -16 Implemented Informix special way to treat NULLs, removed warnings, synced. --------------------------------------------------------------------------- Rod Taylor wrote: -- Start of PGP signed section. > The attached keeps them from appearing. > > It needs to be tested to ensure it still does what is expected. > -- > Rod Taylor <rbt@rbt.ca> > > PGP Key: http://www.rbt.ca/rbtpub.asc [ Attachment, skipping... ] -- End of PGP section, PGP failed! -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073
This is a totally trivial patch for something that was a very minor nit that annoyed me the other day while I was documenting my current project. It makes pg_dump use the same layout for types as for tables, by putting "\n\t" before the first field and "\n" before the final ");" Can't really justify this too much except to say I had an itch and I scratched it ;-) cheers andrew *** pg_dump.c~ 2003-06-25 00:08:19.000000000 -0400 --- pg_dump.c 2003-07-17 15:34:52.000000000 -0400 *************** *** 3412,3418 **** i_attname = PQfnumber(res, "attname"); i_atttypdefn = PQfnumber(res, "atttypdefn"); ! appendPQExpBuffer(q, "CREATE TYPE %s AS (", fmtId(tinfo->typname)); for (i = 0; i < ntups; i++) --- 3412,3418 ---- i_attname = PQfnumber(res, "attname"); i_atttypdefn = PQfnumber(res, "atttypdefn"); ! appendPQExpBuffer(q, "CREATE TYPE %s AS (\n", fmtId(tinfo->typname)); for (i = 0; i < ntups; i++) *************** *** 3423,3433 **** attname = PQgetvalue(res, i, i_attname); atttypdefn = PQgetvalue(res, i, i_atttypdefn); ! if (i > 0) ! appendPQExpBuffer(q, ",\n\t"); ! appendPQExpBuffer(q, "%s %s", fmtId(attname), atttypdefn); } ! appendPQExpBuffer(q, ");\n"); /* * DROP must be fully qualified in case same name appears in --- 3423,3431 ---- attname = PQgetvalue(res, i, i_attname); atttypdefn = PQgetvalue(res, i, i_atttypdefn); ! appendPQExpBuffer(q, "\n\t%s %s", fmtId(attname), atttypdefn); } ! appendPQExpBuffer(q, "\n);\n"); /* * DROP must be fully qualified in case same name appears in
trivial or not the patch was broken. *sigh*. it's been a long day. This patch will work. sorry andrew RCS file: /projects/cvsroot/pgsql-server/src/bin/pg_dump/pg_dump.c,v retrieving revision 1.335 diff -c -w -r1.335 pg_dump.c *** pg_dump.c 25 Jun 2003 04:08:19 -0000 1.335 --- pg_dump.c 18 Jul 2003 21:14:34 -0000 *************** *** 3423,3433 **** attname = PQgetvalue(res, i, i_attname); atttypdefn = PQgetvalue(res, i, i_atttypdefn); ! if (i > 0) ! appendPQExpBuffer(q, ",\n\t"); ! appendPQExpBuffer(q, "%s %s", fmtId(attname), atttypdefn); } ! appendPQExpBuffer(q, ");\n"); /* * DROP must be fully qualified in case same name appears in --- 3423,3433 ---- attname = PQgetvalue(res, i, i_attname); atttypdefn = PQgetvalue(res, i, i_atttypdefn); ! appendPQExpBuffer(q, "\n\t%s %s", fmtId(attname), atttypdefn);! if (i < ntups - 1) ! appendPQExpBuffer(q, ","); } ! appendPQExpBuffer(q, "\n);\n"); /* * DROP must be fully qualified in case same name appears in > > This is a totally trivial patch for something that was a very minor nit > that annoyed me the other day while I was documenting my current > project. It makes pg_dump use the same layout for types as for tables, > by putting "\n\t" before the first field and "\n" before the final ");" > > Can't really justify this too much except to say I had an itch and I > scratched it ;-) >
Later patch has been added to the PostgreSQL unapplied patches list at: http://momjian.postgresql.org/cgi-bin/pgpatches I will try to apply it within the next 48 hours. --------------------------------------------------------------------------- Andrew Dunstan wrote: > > This is a totally trivial patch for something that was a very minor nit that > annoyed me the other day while I was documenting my current project. It > makes pg_dump use the same layout for types as for tables, by putting "\n\t" > before the first field and "\n" before the final ");" > > Can't really justify this too much except to say I had an itch and I > scratched it ;-) > > cheers > > andrew > > > > *** pg_dump.c~ 2003-06-25 00:08:19.000000000 -0400 > --- pg_dump.c 2003-07-17 15:34:52.000000000 -0400 > *************** > *** 3412,3418 **** > i_attname = PQfnumber(res, "attname"); > i_atttypdefn = PQfnumber(res, "atttypdefn"); > > ! appendPQExpBuffer(q, "CREATE TYPE %s AS (", > fmtId(tinfo->typname)); > > for (i = 0; i < ntups; i++) > --- 3412,3418 ---- > i_attname = PQfnumber(res, "attname"); > i_atttypdefn = PQfnumber(res, "atttypdefn"); > > ! appendPQExpBuffer(q, "CREATE TYPE %s AS (\n", > fmtId(tinfo->typname)); > > for (i = 0; i < ntups; i++) > *************** > *** 3423,3433 **** > attname = PQgetvalue(res, i, i_attname); > atttypdefn = PQgetvalue(res, i, i_atttypdefn); > > ! if (i > 0) > ! appendPQExpBuffer(q, ",\n\t"); > ! appendPQExpBuffer(q, "%s %s", fmtId(attname), atttypdefn); > } > ! appendPQExpBuffer(q, ");\n"); > > /* > * DROP must be fully qualified in case same name appears in > --- 3423,3431 ---- > attname = PQgetvalue(res, i, i_attname); > atttypdefn = PQgetvalue(res, i, i_atttypdefn); > > ! appendPQExpBuffer(q, "\n\t%s %s", fmtId(attname), > atttypdefn); } > ! appendPQExpBuffer(q, "\n);\n"); > > /* > * DROP must be fully qualified in case same name appears in > > > > > > > > ---------------------------(end of broadcast)--------------------------- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073
Newer patch applied. Thanks. --------------------------------------------------------------------------- Andrew Dunstan wrote: > > This is a totally trivial patch for something that was a very minor nit that > annoyed me the other day while I was documenting my current project. It > makes pg_dump use the same layout for types as for tables, by putting "\n\t" > before the first field and "\n" before the final ");" > > Can't really justify this too much except to say I had an itch and I > scratched it ;-) > > cheers > > andrew > > > > *** pg_dump.c~ 2003-06-25 00:08:19.000000000 -0400 > --- pg_dump.c 2003-07-17 15:34:52.000000000 -0400 > *************** > *** 3412,3418 **** > i_attname = PQfnumber(res, "attname"); > i_atttypdefn = PQfnumber(res, "atttypdefn"); > > ! appendPQExpBuffer(q, "CREATE TYPE %s AS (", > fmtId(tinfo->typname)); > > for (i = 0; i < ntups; i++) > --- 3412,3418 ---- > i_attname = PQfnumber(res, "attname"); > i_atttypdefn = PQfnumber(res, "atttypdefn"); > > ! appendPQExpBuffer(q, "CREATE TYPE %s AS (\n", > fmtId(tinfo->typname)); > > for (i = 0; i < ntups; i++) > *************** > *** 3423,3433 **** > attname = PQgetvalue(res, i, i_attname); > atttypdefn = PQgetvalue(res, i, i_atttypdefn); > > ! if (i > 0) > ! appendPQExpBuffer(q, ",\n\t"); > ! appendPQExpBuffer(q, "%s %s", fmtId(attname), atttypdefn); > } > ! appendPQExpBuffer(q, ");\n"); > > /* > * DROP must be fully qualified in case same name appears in > --- 3423,3431 ---- > attname = PQgetvalue(res, i, i_attname); > atttypdefn = PQgetvalue(res, i, i_atttypdefn); > > ! appendPQExpBuffer(q, "\n\t%s %s", fmtId(attname), > atttypdefn); } > ! appendPQExpBuffer(q, "\n);\n"); > > /* > * DROP must be fully qualified in case same name appears in > > > > > > > > ---------------------------(end of broadcast)--------------------------- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073
This was the actual patch applied. --------------------------------------------------------------------------- Andrew Dunstan wrote: > > trivial or not the patch was broken. *sigh*. it's been a long day. > > This patch will work. > > sorry > > andrew > > RCS file: /projects/cvsroot/pgsql-server/src/bin/pg_dump/pg_dump.c,v > retrieving revision 1.335 > diff -c -w -r1.335 pg_dump.c > *** pg_dump.c 25 Jun 2003 04:08:19 -0000 1.335 > --- pg_dump.c 18 Jul 2003 21:14:34 -0000 > *************** > *** 3423,3433 **** > attname = PQgetvalue(res, i, i_attname); > atttypdefn = PQgetvalue(res, i, i_atttypdefn); > > ! if (i > 0) > ! appendPQExpBuffer(q, ",\n\t"); > ! appendPQExpBuffer(q, "%s %s", fmtId(attname), atttypdefn); > } > ! appendPQExpBuffer(q, ");\n"); > > /* > * DROP must be fully qualified in case same name appears in > --- 3423,3433 ---- > attname = PQgetvalue(res, i, i_attname); > atttypdefn = PQgetvalue(res, i, i_atttypdefn); > > ! appendPQExpBuffer(q, "\n\t%s %s", fmtId(attname), > atttypdefn);! if (i < ntups - 1) > ! appendPQExpBuffer(q, ","); > } > ! appendPQExpBuffer(q, "\n);\n"); > > /* > * DROP must be fully qualified in case same name appears in > > > > > > > This is a totally trivial patch for something that was a very minor nit > > that annoyed me the other day while I was documenting my current > > project. It makes pg_dump use the same layout for types as for tables, > > by putting "\n\t" before the first field and "\n" before the final ");" > > > > Can't really justify this too much except to say I had an itch and I > > scratched it ;-) > > > > > > > ---------------------------(end of broadcast)--------------------------- > TIP 7: don't forget to increase your free space map settings > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073