Cast hstore type to bytea (and later to hex possibly)

From: Igor Stassiy <istassiy(at)gmail(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Cast hstore type to bytea (and later to hex possibly)
Date: 2015-10-15 14:40:29
Message-ID: CAKVOjeySBt4p+VxRKuSk_d+t4+mU-PuT-aho6unM7AFHsfPC7g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

I would like to achieve something like the following:

COPY (select 'a=>x, b=>y'::hstore::bytea) TO STDOUT;

I have implemented an hstore value iterator that works with
pqxx::result::field.c_str() (which has its own binary serialisation format)
and I would like to reuse it to work with records that comes from stdin (in
hex format for example).

How can this be done?

Thank you,
Igor

Browse pgsql-general by date

  From Date Subject
Next Message Dario Beraldi 2015-10-15 14:42:00 Re: Installing plpython3u
Previous Message Rob Richardson 2015-10-15 14:40:11 Re: How can I use crosstab functons in PostgreSQL 9.3?