Message posté par : image95
----------------------------------------
Merci pour votre aide. Voici ce que j'obtiens :
-----------------
Code :
select id, unnest(xpath(
'//cit:CI_Organisation/cit:name/gco:CharacterString/text()|//cit:CI_Organisation/cit:name/gco:CharacterString/text()',
CAST(data AS XML),
ARRAY[
ARRAY['cit',
'http://standards.iso.org/iso/19115/-3/cit/2.0'],
ARRAY['gco',
'http://standards.iso.org/iso/19115/-3/gco/1.0'],
ARRAY['mdb','http://standards.iso.org/iso/19115/-3/mdb/2.0']-3/mdb/2.0'],
ARRAY['cat','http://standards.iso.org/iso/19115/-3/cat/1.0']-3/cat/1.0'],
ARRAY['gfc','http://standards.iso.org/iso/19110/gfc/1.1']10/gfc/1.1'],
ARRAY['cit','http://standards.iso.org/iso/19115/-3/cit/2.0']-3/cit/2.0'],
ARRAY['gcx','http://standards.iso.org/iso/19115/-3/gcx/1.0']-3/gcx/1.0'],
ARRAY['gex','http://standards.iso.org/iso/19115/-3/gex/1.0']-3/gex/1.0'],
ARRAY['lan','http://standards.iso.org/iso/19115/-3/lan/1.0']-3/lan/1.0'],
ARRAY['srv','http://standards.iso.org/iso/19115/-3/srv/2.1']-3/srv/2.1'],
ARRAY['mas','http://standards.iso.org/iso/19115/-3/mas/1.0']-3/mas/1.0'],
ARRAY['mcc','http://standards.iso.org/iso/19115/-3/mcc/1.0']-3/mcc/1.0'],
ARRAY['mco','http://standards.iso.org/iso/19115/-3/mco/1.0']-3/mco/1.0'],
ARRAY['mda','http://standards.iso.org/iso/19115/-3/mda/1.0']-3/mda/1.0'],
ARRAY['mds','http://standards.iso.org/iso/19115/-3/mds/2.0']-3/mds/2.0'],
ARRAY['mdt','http://standards.iso.org/iso/19115/-3/mdt/2.0']-3/mdt/2.0'],
ARRAY['mex','http://standards.iso.org/iso/19115/-3/mex/1.0']-3/mex/1.0'],
ARRAY['mmi','http://standards.iso.org/iso/19115/-3/mmi/1.0']-3/mmi/1.0'],
ARRAY['mpc','http://standards.iso.org/iso/19115/-3/mpc/1.0']-3/mpc/1.0'],
ARRAY['mrc','http://standards.iso.org/iso/19115/-3/mrc/2.0']-3/mrc/2.0'],
ARRAY['mrd','http://standards.iso.org/iso/19115/-3/mrd/1.0']-3/mrd/1.0'],
ARRAY['mri','http://standards.iso.org/iso/19115/-3/mri/1.0']-3/mri/1.0'],
ARRAY['mrl','http://standards.iso.org/iso/19115/-3/mrl/2.0']-3/mrl/2.0'],
ARRAY['mrs','http://standards.iso.org/iso/19115/-3/mrs/1.0']-3/mrs/1.0'],
ARRAY['msr','http://standards.iso.org/iso/19115/-3/msr/2.0']-3/msr/2.0'],
ARRAY['mdq','http://standards.iso.org/iso/19157/-2/mdq/1.0']-2/mdq/1.0'],
ARRAY['mac','http://standards.iso.org/iso/19115/-3/mac/2.0']-3/mac/2.0'],
ARRAY['gco','http://standards.iso.org/iso/19115/-3/gco/1.0']-3/gco/1.0'],
ARRAY['gml','http://www.opengis.net/gml/3.2']et/gml/3.2'],
ARRAY['xlink','http://www.w3.org/1999/xlink']1999/xlink'],
ARRAY['xsi','http://www.w3.org/2001/XMLSchema-instance']
])) as orga_name, changedate, createdate, displayorder, doctype, extra,
popularity, rating, root, schemaid, title, istemplate, isharvested, harvesturi,
harvestuuid, groupowner, metadata.owner, metadata.source, uuid
from public.metadata
group by XMLSERIALIZE(CONTENT 'orga_name' as text)
-----------------
J'obtiens :
-----------------
Code :
ERROR: column "metadata.id" must appear in the GROUP BY clause or be used in an
aggregate function
LINE 1: select id, unnest(xpath(
^
SQL state: 42803
Character: 8
-----------------
----------------------------------------
Le message est situé
https://georezo.net/forum/viewtopic.php?pid=370809#p370809
Pour y répondre : geobd(a)ml.georezo.net ou reply de votre messagerie
Pour vous désabonner connectez-vous sur le forum puis Profil / Abonnement
--
Association GeoRezo - le portail géomatique
https://georezo.net