benoitdm-oslandia / pg_featureserv

Apache License 2.0
1 stars 0 forks source link

Bug - cannot POST feature to table without sequence #171

Closed benoitdm-oslandia closed 1 year ago

benoitdm-oslandia commented 1 year ago

When a table has been created without a sequence to handle the id, pg_featureserv is unable to create data in this table.

Will not work:

CREATE TABLE IF NOT EXISTS %s (
            id INT PRIMARY KEY,
            geometry public.geometry(Point, 4326) NOT NULL
);

Will be ok:

CREATE TABLE IF NOT EXISTS %s (
            id SERIAL PRIMARY KEY,
            geometry public.geometry(Point, 4326) NOT NULL
);