0

I am creating a spatial view in postgresql (geodatabase) and adding auto incrementing objectid field. I tried the following two ways to create it but in both cases once I register the view to the geodatabase I get the following error to load the table "Could not load from the data source. If you correct the problem , press the refresh button to reload the data. Possible problems can include bad network connection, invalid field etc. Item not found in this collection."

   CREATE OR REPLACE VIEW gismgr.ap_bg_vw AS
     SELECT nextval('ap_seq'::regclass)::integer AS objectid, ap.*, str.shape
       FROM ap_bg ap
       LEFT JOIN attribute_vw str ON str.attri_num = ap.attri_number


CREATE OR REPLACE VIEW gismgr.ap_bg_vw AS
     Select next_rowid('gismgr', 'ap_bg_vw')::integer AS objectid, ap.*, str.shape
       FROM ap_bg ap
       LEFT JOIN attribute_vw str ON str.attri_num = ap.attri_number

What am I missing?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.