Message posté par : image95
----------------------------------------
Bonjour,
Merci. Je viens de tester votre dernière proposition. Mais de mon coté j'ai un message
d'erreur.
-----------------
Code :
with tmp1 as (
select id, regexp_split_to_array(unnest(r[2:array_length(r, 1) - 1]), '=') as
xmlns, data
from public.metadata,
regexp_split_to_array(replace(data::text, '"', ''), '
xmlns:') r
), tmp2 as (
select id, array_agg(xmlns) as xmlns
from tmp1
group by id
) select x.id, t.xmlns
from tmp2 t join public.metadata x using(id);
-----------------
Voici ce que j'obtiens :
-----------------
Code :
ERROR: cannot accumulate arrays of different dimensionality
SQL state: 2202E
-----------------
Je me permets une petite question additionnelle. Dans notre précédent exemple, dans la
fonction xpath, on définissait uniquement un tag
-----------------
Code :
//cit:CI_Organisation/cit:name/gco:CharacterString/text()'
-----------------
Est il possible de définir plusieurs tags ? Par exemple, d'ajouter
-----------------
Code :
//gmd:organisationName/gco:CharacterString/text()'
-----------------
Par avance, un grans merci.
----------------------------------------
Le message est situé
https://georezo.net/forum/viewtopic.php?pid=370324#p370324
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