BUG #18929: After the view is created, executed query against the view definition, reported syntax error.
PG Bug reporting form <noreply@postgresql.org>
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: 707330139@qq.com
Date: 2025-05-15T04:04:23Z
Lists: pgsql-bugs
The following bug has been logged on the website:
Bug reference: 18929
Logged by: yonghao lee
Email address: 707330139@qq.com
PostgreSQL version: 17.5
Operating system: linux
Description:
Hello PostgreSQL team,
I found an error in the view definition SQL given when looking at the view
description using \d+. Here are the detailed steps for this problem.
executed query:
postgres=# CREATE TABLE onek (thousand int4);
CREATE TABLE
postgres=# CREATE VIEW limit_thousand_v_3 AS SELECT thousand FROM onek
WHERE thousand < 995 ORDER BY thousand FETCH FIRST (NULL::bigint +
1::bigint) ROWS WITH TIES;
CREATE VIEW
postgres=# \d+ limit_thousand_v_3
View "public.limit_thousand_v_3"
Column | Type | Collation | Nullable | Default | Storage | Description
----------+---------+-----------+----------+---------+---------+-------------
thousand | integer | | | | plain |
View definition:
SELECT thousand
FROM onek
WHERE thousand < 995
ORDER BY thousand
FETCH FIRST NULL::bigint + 1::bigint ROWS WITH TIES;
postgres=# SELECT thousand
postgres-# FROM onek
postgres-# WHERE thousand < 995
postgres-# ORDER BY thousand
postgres-# FETCH FIRST NULL::bigint + 1::bigint ROWS WITH TIES;
ERROR: syntax error at or near "::"
LINE 5: FETCH FIRST NULL::bigint + 1::bigint ROWS WITH TIES;
^
I think that executing the view definition query will be successful.
I'm happy to provide more info if I can/ if needed.
Thanks,
yonghao lee,
Highgo software.
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix cross-version upgrade test failure
- 558ea446aeb0 16.10 landed
- a4da7b0cfabd 17.6 landed
- cbf53e2b8a8e 18.0 landed
-
Fix deparsing FETCH FIRST <expr> ROWS WITH TIES
- 0420b24fee5e 14.19 landed
- 72fe74ca5333 15.14 landed
- 92a9ba3b96c2 16.10 landed
- 54c05292b1ff 17.6 landed
- 29f7ce6fe78e 18.0 landed
- 7ee00918f7cd 13.22 landed