Pg: Add "$hex" pseudo-type
This commit is contained in:
parent
baf0f90bd5
commit
15954f4ad5
6 changed files with 63 additions and 15 deletions
|
|
@ -67,6 +67,13 @@ v bytea => 'hello', undef, '\x68656c6c6f';
|
|||
v bytea => "\xaf\x90", undef, '\xaf90';
|
||||
f bytea => "\x{1234}";
|
||||
|
||||
$conn->set_type(bytea => '$hex');
|
||||
v bytea => '', undef, '\x';
|
||||
v bytea => '68656c6c6f', undef, '\x68656c6c6f';
|
||||
v bytea => "af90", undef, '\xaf90';
|
||||
f bytea => 'a';
|
||||
f bytea => 'a f';
|
||||
|
||||
v '"char"' => $_ for (1, '1', 'a', 'A', '-');
|
||||
v '"char"' => "\x84", undef, '\204';
|
||||
f '"char"' => $_ for ('', 'ab', "\x{1234}");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue