index c178baa472628aed37f6536c80d47bd58a8f2e2c..b95aba5e2f7385743f76ac2f3b8c0adc98c3c2c9 100644 (file)
* by PostgreSQL
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.371 2004年05月25日 01:00:24 momjian Exp $
+ * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.372 2004年05月26日 18:24:22 momjian Exp $
*
*-------------------------------------------------------------------------
*/
myFormatType(const char *typname, int32 typmod)
{
char *result;
+ bool isarray = false;
PQExpBuffer buf = createPQExpBuffer();
+ /* Handle array types */
+ if (typname[0] == '_')
+ {
+ isarray = true;
+ typname++;
+ }
+
/* Show lengths on bpchar and varchar */
if (!strcmp(typname, "bpchar"))
{
else
appendPQExpBuffer(buf, "%s", fmtId(typname));
+ /* Append array qualifier for array types */
+ if (isarray)
+ appendPQExpBuffer(buf, "[]");
+
result = strdup(buf->data);
destroyPQExpBuffer(buf);