Help Center/ GaussDB(DWS)/ Troubleshooting/ Database Use/ A View Failed to Be Queried
Updated on 2022-07-04 GMT+08:00

A View Failed to Be Queried

Symptom

When a user connects to a cluster database and then queries a view, the following error information is displayed:

[GAUSS-01850] : object with oid 16420 is not a partition object

Cause Analysis

The queried view is created on a partition of a partitioned table, therefore, querying this view requires access to the target partition. If this partition has been deleted, the view fails to be queried.

Solution

  1. Ensure that you are running an SQL statement on the view object and obtain the view name.

    Check whether the object specified for FROM in the SQL statement is the view. If it is, record the view name.

  2. Delete the view using the obtained user name and schema.
  3. Run the SQL statement again. The target partition has been deleted, therefore, querying the view is unnecessary.