|
7 | 7 | * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
|
8 | 8 | * Portions Copyright (c) 1994, Regents of the University of California
|
9 | 9 | *
|
10 |
| - * $PostgreSQL: pgsql/src/backend/utils/adt/xml.c,v 1.88 2009/05/13 20:27:17 tgl Exp $ |
| 10 | + * $PostgreSQL: pgsql/src/backend/utils/adt/xml.c,v 1.89 2009/06/08 21:32:33 petere Exp $ |
11 | 11 | *
|
12 | 12 | *-------------------------------------------------------------------------
|
13 | 13 | */
|
@@ -2627,12 +2627,16 @@ map_sql_table_to_xmlschema(TupleDesc tupdesc, Oid relid, bool nulls,
|
2627 | 2627 | rowtypename);
|
2628 | 2628 |
|
2629 | 2629 | for (i=0;i<tupdesc->natts;i++)
|
| 2630 | +{ |
| 2631 | +if (tupdesc->attrs[i]->attisdropped) |
| 2632 | +continue; |
2630 | 2633 | appendStringInfo(&result,
|
2631 | 2634 | " <xsd:element name=\"%s\" type=\"%s\"%s></xsd:element>\n",
|
2632 | 2635 | map_sql_identifier_to_xml_name(NameStr(tupdesc->attrs[i]->attname),
|
2633 | 2636 | true, false),
|
2634 | 2637 | map_sql_type_to_xml_name(tupdesc->attrs[i]->atttypid,-1),
|
2635 | 2638 | nulls ?" nillable=\"true\"" :" minOccurs=\"0\"");
|
| 2639 | +} |
2636 | 2640 |
|
2637 | 2641 | appendStringInfoString(&result,
|
2638 | 2642 | " </xsd:sequence>\n"
|
|