| 80 | */ |
| 81 | PG_FUNCTION_INFO_V1(svec_send); |
| 82 | Datum |
| 83 | svec_send(PG_FUNCTION_ARGS) |
| 84 | { |
| 85 | StringInfoData buf; |
| 86 | SvecType *svec = PG_GETARG_SVECTYPE_P(0); |
| 87 | SparseData sdata = sdata_from_svec(svec); |
| 88 | |
| 89 | pq_begintypsend(&buf); |
| 90 | pq_sendint(&buf,sdata->type_of_data,sizeof(Oid)); |
| 91 | pq_sendint(&buf,sdata->unique_value_count,sizeof(int)); |
| 92 | pq_sendint(&buf,sdata->total_value_count,sizeof(int)); |
| 93 | pq_sendint(&buf,sdata->vals->len,sizeof(int)); |
| 94 | pq_sendint(&buf,sdata->index->len,sizeof(int)); |
| 95 | pq_sendbytes(&buf,sdata->vals->data,sdata->vals->len); |
| 96 | pq_sendbytes(&buf,sdata->index->data,sdata->index->len); |
| 97 | |
| 98 | PG_RETURN_BYTEA_P(pq_endtypsend(&buf)); |
| 99 | } |
| 100 | /* |
| 101 | * svec_recv - converts external binary format to text |
| 102 | */ |
nothing calls this directly
no test coverage detected