X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-pq;a=blobdiff_plain;f=scripts%2Fphp_pq_type-pg11.php;fp=scripts%2Fphp_pq_type-pg11.php;h=0e05bc2d109368ed837e97d3392153a8f3549c7a;hp=0000000000000000000000000000000000000000;hb=5ba3107011d4050d5ae5877dae80e382dc228e6a;hpb=7ebb278e7854e8dd7c4fd6c0363531642d135676 diff --git a/scripts/php_pq_type-pg11.php b/scripts/php_pq_type-pg11.php new file mode 100755 index 0000000..0e05bc2 --- /dev/null +++ b/scripts/php_pq_type-pg11.php @@ -0,0 +1,86 @@ +#!/usr/bin/env php +\w+) => \'(?P(?:[^\']|(?<=\\\\)\')+)\'/', $set_data, $set_matches)) { + fprintf(STDERR, "Failed matching key value pairs in set: '%s'\n", $set_data); + continue; + } + $set = array_combine($set_matches["key"], $set_matches["val"]); + $ucn = strtoupper($set["typname"]); + $typ[$set["oid"]] = $ucn; + + if (isset($set["array_type_oid"])) { + $arr[$set["array_type_oid"]] = $set["oid"]; + $typ[$set["array_type_oid"]] = $ucn . "ARRAY"; + } + if (isset($set["typdelim"])) { + $delims[$set["oid"]] = $delims[$set["array_type_oid"]] = $set["typdelim"]; + } +} + +ksort($typ, SORT_NUMERIC); +ksort($arr, SORT_NUMERIC); +?> + +/* Generated file. See scripts/gen_pq_type-pq11.php */ + +#ifndef PHP_PQ_TYPE +# define PHP_PQ_TYPE(t,o) +#endif + + $ucn) : ?> +#ifndef PHP_PQ_OID_ + +# define PHP_PQ_OID_ + +#endif +PHP_PQ_TYPE("", ) + + +#ifndef PHP_PQ_TYPE_IS_ARRAY +# define PHP_PQ_TYPE_IS_ARRAY(oid) ( \ + 0 \ + $type) : ?> + || ((oid) == ) \ + +) +#endif + +#ifndef PHP_PQ_TYPE_OF_ARRAY +# define PHP_PQ_TYPE_OF_ARRAY(oid) ( \ + $type) : ?> + (oid) == ? : \ + + 0 \ +) +#endif + +#ifndef PHP_PQ_DELIM_OF_ARRAY +# define PHP_PQ_DELIM_OF_ARRAY(oid) ((char) ( \ + $delim) : ?> + (oid) == ? '' : \ + + ',' \ +)) +#endif