| From: | Sami Imseih <samimseih(at)gmail(dot)com> |
|---|---|
| To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Fix GRAPH TABLE label and property error reporting |
| Date: | 2026-08-18 15:46:09 |
| Message-ID: | CAA5RZ0v27a=suTi1QBwJp9=XsPewimf3XLxv7j8TY+jQRwY7NQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
While looking at GRAPH_TABLE parsing, I found that in
transformGraphTablePropertyRef(), a property reference whose name does
not exist in the property graph is reported with ERRCODE_SYNTAX_ERROR:
```
pgptup = SearchSysCache2(PROPGRAPHPROPNAME, ...);
if (!HeapTupleIsValid(pgptup))
ereport(ERROR,
errcode(ERRCODE_SYNTAX_ERROR),
errmsg("property \"%s\" does not exist", propname));
```
Unlike the A_Star cases just above, which are genuine syntax errors, here
the statement parses fine but the property does not resolve. It should use
ERRCODE_UNDEFINED_OBJECT. The unknown label check in
transformLabelExpr() already does this, so these should be consistent.
ERRCODE_UNDEFINED_COLUMN could also fit, but a property is an object of
the graph, not a column of a relation, so I went with UNDEFINED_OBJECT to
match the label check. Maybe others have a different opinion on the exact
code, but this clearly should not be a syntax error.
While at it, neither the property nor the label lookup supplied an error
position. The attached patch adds one to both.
--
Sami Imseih
Amazon Web Services (AWS)
| Attachment | Content-Type | Size |
|---|---|---|
| v1-0001-Fix-GRAPH_TABLE-label-and-property-error-reportin.patch | application/octet-stream | 4.4 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andrey Rachitskiy | 2026-08-18 15:48:14 | Re: Residual cleanups for tied objects in PL/Perl |
| Previous Message | Tom Lane | 2026-08-18 15:39:14 | Recent "could not register background process" buildfarm failures |