pike.git/
lib/
modules/
Sql.pmod/
pgsql_util.pmod
Branch:
Tag:
Non-build tags
All tags
No tags
2017-12-11
2017-12-11 13:43:56 by Stephen R. van den Berg <srb@cuci.nl>
e8f44168074579bc6b5b3b6162b6bc8d272b0a56 (
15
lines) (+
8
/-
7
)
[
Show
|
Annotate
]
Branch:
master
pgsql: Tie the datatypes to __builtin.* to avoid surprises.
242:
return 0; // text }
-
private array timestamptotype = (
{Timestamp
, 8, "usecs", 8});
-
private array datetotype = (
{Date
, 4, "days", 4});
+
private array timestamptotype = (
{__builtin.Timestamp
, 8, "usecs", 8});
+
private array datetotype = (
{__builtin.Date
, 4, "days", 4});
private mapping(int:array) oidtotype = ([ DATEOID: datetotype,
-
TIMEOID: (
{Time
, 8, "usecs", 8}),
-
TIMETZOID: (
{TimeTZ
, 12, "usecs", 8, "timezone", 4}),
-
INTERVALOID:
(
{Interval
, 16, "usecs", 8, "days", 4, "months", 4}),
+
TIMEOID: (
{__builtin.Time
, 8, "usecs", 8}),
+
TIMETZOID: (
{__builtin.TimeTZ
, 12, "usecs", 8, "timezone", 4}),
+
INTERVALOID: (
{__builtin.Interval
, 16, "usecs", 8, "days", 4, "months", 4}),
TIMESTAMPOID: timestamptotype, TIMESTAMPTZOID: timestamptotype, INT4RANGEOID: ({0, 4}),
957:
till = value; } }
-
value = Range(from, till);
+
value =
__builtin.
Range(from, till);
} break; case CIDROID:
965:
if (_forcetext) value = cr->read(collen); else {
-
value = Inet();
+
value =
__builtin.
Inet();
int iptype = cr->read_int8(); // 2 == IPv4, 3 == IPv6 value->masklen = cr->read_int8() + (iptype == 2 && 12*8); cr->read_int8(); // 0 == INET, 1 == CIDR