Changeset 312
- Timestamp:
- 07/15/10 08:26:47 (8 weeks ago)
- Location:
- trunk/src
- Files:
-
- 2 modified
-
ows/ows_storage.c (modified) (1 diff)
-
wfs/wfs_describe.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/ows/ows_storage.c
r278 r312 161 161 buffer_add_str(sql, "' AND c.relnamespace = n.oid "); 162 162 buffer_add_str(sql, "AND a.attnum > 0 AND a.attrelid = c.oid "); 163 buffer_add_str(sql, "AND a.atttypid = t.oid AND a.attnotnull = 't' ");163 buffer_add_str(sql, "AND a.atttypid = t.oid AND a.attnotnull = 't' AND a.atthasdef='f'"); 164 164 165 165 res = PQexec(o->pg, sql->buf); -
trunk/src/wfs/wfs_describe.c
r311 r312 36 36 buffer * layer_name) 37 37 { 38 buffer *id_name;39 38 array *table; 40 39 array_node *an; … … 55 54 fprintf(o->output, " <xs:sequence>\n"); 56 55 57 id_name = ows_psql_id_column(o, layer_name);58 56 table = ows_psql_describe_table(o, layer_name); 59 57 … … 62 60 /* Output the description of the layer_name */ 63 61 for (an = table->first; an != NULL; an = an->next) { 64 if (!id_name || (id_name && !buffer_cmp(an->key, id_name->buf))) {65 62 fprintf(o->output, " <xs:element name ='"); 66 63 buffer_flush(an->key, o->output); … … 68 65 69 66 if (in_list(mandatory_prop, an->key)) 70 fprintf(o->output, " minOccurs='1' ");67 fprintf(o->output, "nillable='false' minOccurs='1' "); 71 68 else 72 fprintf(o->output, " minOccurs='0' ");69 fprintf(o->output, "nillable='true' minOccurs='0' "); 73 70 74 71 fprintf(o->output, "maxOccurs='1'/>\n"); 75 }76 72 } 77 73