CartoDB / bigmetadata

BSD 3-Clause "New" or "Revised" License
43 stars 11 forks source link

OBS_GetMeta won't complain if column doesn't exist #566

Open danicarrion opened 6 years ago

danicarrion commented 6 years ago

Imagine a query such as this one:

WITH meta AS (
  SELECT OBS_GetMeta(
    ST_SetSRID(ST_Extent(the_geom), 4326),
      '[
        {
          "numer_id":"es.ine.pop_0_4_male",
          "normalization":"area"
        },
        {
          "numer_id":"es.ine.pop_5_10_male",
          "normalization":"area"
         },
....

es.ine.pop_5_10_male doesn't actually exist as a column, but OBS_GetMeta will simply remove that column from the result. Shouldn't it raise an error instead?