This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT * FROM bench_data_person WHERE pbcontains(d, '\x0a045368616e1801' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from proto.CompoundMessageTypes_pb2 import * | |
Person(name="Shiva", sex= Sex.MALE).SerializeToString().hex() | |
>>> '0a045368616e1801' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\echo USE "CREATE EXTENSION protobufutils" to load this file. \quit | |
CREATE FUNCTION pbcontains(bytea, bytea) RETURNS boolean | |
AS '$libdir/protobufutils' | |
LANGUAGE C IMMUTABLE STRICT; | |
CREATE FUNCTION pbmerge(bytea, bytea) RETURNS bytea | |
AS '$libdir/protobufutils' | |
LANGUAGE C IMMUTABLE STRICT; | |
CREATE FUNCTION pbiscanonical(bytea) RETURNS boolean | |
AS '$libdir/protobufutils' | |
LANGUAGE C IMMUTABLE STRICT; |