Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8296097
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T14:51:09+00:00 2026-06-08T14:51:09+00:00

Following on from this earlier question I’m on PostgreSQL 8.4 and am having trouble

  • 0

Following on from this earlier question I’m on PostgreSQL 8.4 and am having trouble with updatable views.

I have a view:

CREATE VIEW filedata_view
AS SELECT num, id, ST_TRANSFORM(the_geom,900913) AS the_geom
FROM filedata

And want to update it from my application throw Geoserver. But get a error:

<ServiceExceptionReport version="1.2.0" xmlns="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/ogc http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd">
 <ServiceException> {http://www.opengeospatial.net/cite}filedata_view is read-only    </ServiceException>
</ServiceExceptionReport>

So views in PostgresSql are not updatable. I need create a rule or trigger to update the view.

I tried this:

CREATE OR REPLACE RULE ins_view_2 AS
ON UPDATE TO filedata_view DO INSTEAD  UPDATE filedata SET the_geom=ST_TRANSFORM(NEW.the_geom,70066)
WHERE num=NEW.num

but it didn’t help, I’m still getting the same error.

Where is my mistake?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T14:51:11+00:00Added an answer on June 8, 2026 at 2:51 pm

    First, I couldn’t agree more with Frank. Use 9.1, and a table trigger. However, it’s possible that neither that nor a view will solve your problem.

    Try doing a manual UPDATE on your view from psql. If that works, and if you connect using the same user ID with opengeospatial, then I’d say the issue could be opengeospatial being too clever for its own good and “knowing” that views can’t be updated. Either that, or it’s trying an INSERT and you haven’t added a matching INSERT rule on your view.

    The message “filedata_view is read-only” isn’t a message PostgreSQL may produce. I’m wondering if opengeospatial is using JDBC metadata (assuming it’s Java) or INFORMATION_SCHEMA or similar to query the schema, is determining that filedata_view is a view, and is concluding that it therefore can’t update it.

    If it were a message from PostgreSQL it would instead say:

    # UPDATE customer_v SET customer_number = 1234; 
    ERROR:  cannot update view "the_view" 
    HINT:  You need an unconditional ON UPDATE DO INSTEAD rule or an INSTEAD OF UPDATE trigger.
    

    It might be informative to enable log_statement = 'all' in postgresql.conf and reload postgresql. Re-test, then look in the logs see what exactly opengeospatial is doing.

    If it turns out it’s detecting a view, you might be able to work around the problem with an ON SELECT rule added to an empty table. The table will work just like a view, but GeoServer won’t be able to tell it is a view and might agree to write to it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

following on from this question (Developing to an interface with TDD), I'm still having
Following on from this question...I'm trying to unit test the following scenario: I have
Following the CSS style trick from this question I was able to create a
Following on from my earlier question, I have decided to have a go at
Following on from my earlier question around loading views from DLLs under ASP.NET MVC,
Following on from this question , I am interested in finding out how you
Following on from this question... What to do when you’ve really screwed up the
I have been working on the following problem from this book . A certain
Following on from an earlier question I'm trying to get multiple (widgets or in
This is a better understanding of a question I had earlier. I have the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.