mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Allow I/O conversion casts to be applied to or from any type that is a member
of the STRING type category, thereby opening up the mechanism for user-defined types. This is mainly for the benefit of citext, though; there aren't likely to be a lot of types that are all general-purpose character strings. Per discussion with David Wheeler.
This commit is contained in:
@ -323,6 +323,6 @@ SELECT COUNT(*) = 19::bigint AS t FROM try;
|
||||
SELECT like_escape( name, '' ) = like_escape( name::text, '' ) AS t FROM srt;
|
||||
SELECT like_escape( name::text, ''::citext ) =like_escape( name::text, '' ) AS t FROM srt;
|
||||
|
||||
--- TODO: Get citext working with magic cast functions?
|
||||
SELECT cidr( '192.168.1.2'::citext ) = cidr( '192.168.1.2'::text ) AS "t TODO";
|
||||
SELECT '192.168.1.2'::cidr::citext = '192.168.1.2'::cidr::text AS "t TODO";
|
||||
--- citext should work as source or destination of I/O conversion casts
|
||||
SELECT cidr( '192.168.1.2'::citext ) = cidr( '192.168.1.2'::text ) AS "t";
|
||||
SELECT '192.168.1.2'::cidr::citext = '192.168.1.2'::cidr::text AS "t";
|
||||
|
Reference in New Issue
Block a user