From: Condor <condor@stz-bg.com>
To: pgsql-general@lists.postgresql.org
Subject: Need help how to reproduce MySQL binary to PosgreSQL
Date: Sun, 09 Aug 2020 09:12:14 +0300
Message-ID: <6ba79f0a4d46b6298b14749369df538a@stz-bg.com> (raw)
Hello,
how I can reproduce MySQL binary to PosgreSQL and use follow
functionality in PG.
On mysql I have table with 3 fields:
CREATE TABLE table (
user_id int,
user_info binary(4),
user_data binary(16)
);
then I use them for example:
UPDATE table set user_info = CHAR(0, 2, 0, 0), user_data = CHAR(123, 1,
0, 2) WHERE user_id = 1;
select and insert them as:
SELECT HEX(user_info) AS user_info, HEX(user_data) AS user_data FROM
table;
INSERT INTO table (user_info, user_data) VALUES
(UNHEX(hexdata_commng_from_app), UNHEX(hexdata_commng_from_app));
I check PG does not have functions HEX and UNHEX. Some one can help a
little ?
Regards,
HS
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: condor@stz-bg.com
Subject: Re: Need help how to reproduce MySQL binary to PosgreSQL
In-Reply-To: <6ba79f0a4d46b6298b14749369df538a@stz-bg.com>
References: <6ba79f0a4d46b6298b14749369df538a@stz-bg.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox