postgres/src/test
Heikki Linnakangas 29f7ce6fe7 Fix deparsing FETCH FIRST <expr> ROWS WITH TIES
In the grammar, <expr> is a c_expr, which accepts only a limited set
of integer literals and simple expressions without parens. The
deparsing logic didn't quite match the grammar rule, and failed to use
parens e.g. for "5::bigint".

To fix, always surround the expression with parens. Would be nice to
omit the parens in simple cases, but unfortunately it's non-trivial to
detect such simple cases. Even if the expression is a simple literal
123 in the original query, after parse analysis it becomes a FuncExpr
with COERCE_IMPLICIT_CAST rather than a simple Const.

Reported-by: yonghao lee
Backpatch-through: 13
Discussion: https://www.postgresql.org/message-id/18929-077d6b7093b176e2@postgresql.org
2025-05-19 18:50:26 +03:00
..
authentication Re-enable SSL connect_fails tests, and fix related race conditions. 2025-04-22 15:10:50 -04:00
examples libpq: Deprecate pg_int64. 2025-03-25 21:40:00 +13:00
icu Update copyright for 2025 2025-01-01 11:21:55 -05:00
isolation Change the names generated for child foreign key constraints. 2025-04-23 12:03:02 -04:00
kerberos Re-enable SSL connect_fails tests, and fix related race conditions. 2025-04-22 15:10:50 -04:00
ldap Re-enable SSL connect_fails tests, and fix related race conditions. 2025-04-22 15:10:50 -04:00
locale Update copyright for 2025 2025-01-01 11:21:55 -05:00
mb
modules aio: Use runtime arguments with injections points in tests 2025-05-10 12:36:57 +09:00
perl Fix order of parameters in POD documentation 2025-05-13 07:29:14 -04:00
postmaster Fix inconsistent quoting for some options in TAP tests 2025-03-17 14:07:12 +09:00
recovery Test restartpoints in archive recovery. 2025-04-20 08:28:48 -07:00
regress Fix deparsing FETCH FIRST <expr> ROWS WITH TIES 2025-05-19 18:50:26 +03:00
ssl Skip RSA-PSS ssl test when using LibreSSL. 2025-05-09 12:29:01 -04:00
subscription Fix the race condition in the test added by 7c99dc587. 2025-05-13 09:54:29 +05:30
Makefile Add PG_TEST_EXTRA configure option to the Make builds 2024-11-04 14:09:38 +02:00
meson.build Update copyright for 2025 2025-01-01 11:21:55 -05:00
README

PostgreSQL tests
================

This directory contains a variety of test infrastructure as well as some of the
tests in PostgreSQL. Not all tests are here -- in particular, there are more in
individual contrib/ modules and in src/bin.

Not all these tests get run by "make check". Check src/test/Makefile to see
which tests get run automatically.

authentication/
  Tests for authentication (but see also below)

examples/
  Demonstration programs for libpq that double as regression tests via
  "make check"

isolation/
  Tests for concurrent behavior at the SQL level

kerberos/
  Tests for Kerberos/GSSAPI authentication and encryption

ldap/
  Tests for LDAP-based authentication

locale/
  Sanity checks for locale data, encodings, etc

mb/
  Tests for multibyte encoding (UTF-8) support

modules/
  Extensions used only or mainly for test purposes, generally not suitable
  for installing in production databases

perl/
  Infrastructure for Perl-based TAP tests

recovery/
  Test suite for recovery and replication

regress/
  PostgreSQL's main regression test suite, pg_regress

ssl/
  Tests to exercise and verify SSL certificate handling

subscription/
  Tests for logical replication