git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: d611f8b) | patch
Allow casting between bytea and integer types.
Fri, 7 Mar 2025 09:31:18 +0000 (09:31 +0000)
Fri, 7 Mar 2025 09:31:18 +0000 (09:31 +0000)
commit 6da469badaffec32f8a804181cca279561467378
Allow casting between bytea and integer types.

This allows smallint, integer, and bigint values to be cast to and
from bytea. The bytea value is the two's complement representation of
the integer, with the most significant byte first. For example:

1234::bytea -> \x000004d2
(-1234)::bytea -> \xfffffb2e

Author: Aleksander Alekseev <aleksander@timescale.com>
Reviewed-by: Joel Jacobson <joel@compiler.org>
Reviewed-by: Yugo Nagata <nagata@sraoss.co.jp>
Reviewed-by: Peter Eisentraut <peter@eisentraut.org>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Reviewed-by: Dean Rasheed <dean.a.rasheed@gmail.com>
Discussion: https://postgr.es/m/CAJ7c6TPtOp6%2BkFX5QX3fH1SVr7v65uHr-7yEJ%3DGMGQi5uhGtcA%40mail.gmail.com
doc/src/sgml/func.sgml diff | blob | blame | history
src/backend/utils/adt/varlena.c diff | blob | blame | history
src/include/catalog/catversion.h diff | blob | blame | history
src/include/catalog/pg_cast.dat diff | blob | blame | history
src/include/catalog/pg_proc.dat diff | blob | blame | history
src/test/regress/expected/opr_sanity.out diff | blob | blame | history
src/test/regress/expected/strings.out diff | blob | blame | history
src/test/regress/sql/strings.sql diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /