bilalsp opened a new issue, #2450:
URL: https://github.com/apache/age/issues/2450
**Describe the bug**
Adding a GENERATED ALWAYS AS (...) STORED column to a vertex label table
(_ag_label_vertex child table) causes a segmentation fault (signal 11) during
Cypher CREATE / SET operations.
The crash occurs in the vertex creation path (likely during heap_insert in
the executor).
**How are you accessing AGE (Command line, driver, etc.)?**
Directly via cypher() SQL function (IN psql client).
**What data setup do we need to do?**
```pgsql
-- 1. Create graph and label
SELECT create_graph('age_bug');
SELECT create_vlabel('age_bug', 'Product');
-- 2. Add generated column (this triggers the bug)
ALTER TABLE age_bug."Product"
ADD COLUMN category VARCHAR(25) GENERATED ALWAYS AS
(agtype_access_operator(properties, '"category"')) STORED;
```
**What is the necessary configuration info needed?**
- [e.g. Installed PostGIS]
**What is the command that caused the error?**
```pgsql
SELECT * FROM cypher('age_bug', $$
CREATE (p:Product {category: 'disk', type: 'M1234', version: 1})
RETURN p
$$) AS (p agtype);
```
```
ERROR:
psql client log: SQL Error [08006]: An I/O error occurred while sending to
the backend.
SERVER log:
LOG: server process (PID xxxx) was terminated by signal 11: Segmentation
fault
DETAIL: Failed process was running: [the cypher CREATE query]
```
*Even though MATCH query does NOT RAISE ANY error*
```pgsql
SELECT * FROM cypher('age_bug', $$
MATCH (p:Product {category: 'disk', type: 'M1234', version: 1})
RETURN p
$$) AS (p agtype);
```
**Expected behavior**
AGE should support standard PostgreSQL features like generated columns on
label TABLES
**Environment (please complete the following information):**
- AGE Version: release/PG15/1.5.0
- PostgreSQL Version: PostgreSQL 15.8 (Debian 15.8-1.pgdg100+1) on
x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit
- OS: Linux
**Additional context**
Add any other context about the problem here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]