File tree 1 file changed +13
-1
lines changed
1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 12
12
* by PostgreSQL
13
13
*
14
14
* IDENTIFICATION
15
- * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.371 2004/05/25 01:00:24 momjian Exp $
15
+ * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.372 2004/05/26 18:24:22 momjian Exp $
16
16
*
17
17
*-------------------------------------------------------------------------
18
18
*/
@@ -7722,8 +7722,16 @@ static char *
7722
7722
myFormatType (const char * typname , int32 typmod )
7723
7723
{
7724
7724
char * result ;
7725
+ bool isarray = false;
7725
7726
PQExpBuffer buf = createPQExpBuffer ();
7726
7727
7728
+ /* Handle array types */
7729
+ if (typname [0 ] == '_' )
7730
+ {
7731
+ isarray = true;
7732
+ typname ++ ;
7733
+ }
7734
+
7727
7735
/* Show lengths on bpchar and varchar */
7728
7736
if (!strcmp (typname , "bpchar" ))
7729
7737
{
@@ -7767,6 +7775,10 @@ myFormatType(const char *typname, int32 typmod)
7767
7775
else
7768
7776
appendPQExpBuffer (buf , "%s" , fmtId (typname ));
7769
7777
7778
+ /* Append array qualifier for array types */
7779
+ if (isarray )
7780
+ appendPQExpBuffer (buf , "[]" );
7781
+
7770
7782
result = strdup (buf -> data );
7771
7783
destroyPQExpBuffer (buf );
7772
7784
You can’t perform that action at this time.
0 commit comments