1

I am trying to create a table in postgres for storing raster data. I have 2 different environments: dev and prod.

if I execute the DDL statement in dev then it is creating the table without any problem.

But in prod I am getting the some strange error. How to solve this issue? I am not an admin person and currently facing difficulties with this.

DDL for the table

CREATE TABLE test_shema.test_table (
    rid int4 NOT NULL,
    rast raster NULL,
    CONSTRAINT elevation_hi_pkey_test PRIMARY KEY (rid),
    CONSTRAINT enforce_height_rast_test CHECK ((st_height(rast) = ANY (ARRAY[100, 92]))),
    CONSTRAINT enforce_max_extent_rast_test CHECK ((st_envelope(rast) @ '0103000020E61000000100000005000000A2221ECF131C64C07F55AF453F8C3240A2221ECF131C64C0FEE6DF13C4963640444672D5B14263C0FEE6DF13C4963640444672D5B14263C07F55AF453F8C3240A2221ECF131C64C07F55AF453F8C3240'::geometry)) NOT VALID,
    CONSTRAINT enforce_nodata_values_rast_test CHECK ((_raster_constraint_nodata_values(rast) = '{32767.0000000000}'::numeric[])),
    CONSTRAINT enforce_num_bands_rast_test CHECK ((st_numbands(rast) = 1)),
    CONSTRAINT enforce_out_db_rast_test CHECK ((_raster_constraint_out_db(rast) = '{f}'::boolean[])),
    CONSTRAINT enforce_pixel_types_rast_test CHECK ((_raster_constraint_pixel_types(rast) = '{16BSI}'::text[])),
    CONSTRAINT enforce_same_alignment_rast_test CHECK (st_samealignment(rast, '01000000006A98816335DA4E3F6A98816335DA4EBFA2221ECF131C64C0FEE6DF13C496364000000000000000000000000000000000E610000001000100'::raster)),
    CONSTRAINT enforce_scalex_rast_test CHECK ((round((st_scalex(rast))::numeric, 10) = round(0.000941539829921079, 10))),
    CONSTRAINT enforce_scaley_rast_test CHECK ((round((st_scaley(rast))::numeric, 10) = round((-0.000941539829921079), 10))),
    CONSTRAINT enforce_srid_rast_test CHECK ((st_srid(rast) = 4326)),
    CONSTRAINT enforce_width_rast_test CHECK ((st_width(rast) = ANY (ARRAY[100, 15])))
);

Error that I am getting in prod environment

ERROR:  operator does not exist: double precision[] = numeric[]
HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.

1 Answer 1

2

Must be the third constraint. Compare with this instead:

'{32767.0000000000}'::double precision[]
Sign up to request clarification or add additional context in comments.

4 Comments

yah..I changed and it is working.But the strange thing is with the postgres version 9.3.25 it is working with numeric[] but in 9.3.24 it has to be double precision[]
I don't believe that for a second.
I also believe it should not happen just for a sub version change so I will check the matter further.
Now Table is getting created but while loading data I am facing this unknown issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.