Re: converting text to bytea

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Yambu <hyambu(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: converting text to bytea
Date: 2021-02-22 07:08:49
Message-ID: CAFj8pRAdyZKFqci-nzM6FuSpTFSHN38ynqHA0cuaq+dpzeeAyw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi

po 22. 2. 2021 v 7:37 odesílatel Yambu <hyambu(at)gmail(dot)com> napsal:

> Hello
>
> This sounds simple, but im not getting the results when i cast text to
> bytea like this first_name::bytea . Is there another way to do this?
>

You should to use convert_to function

https://www.postgresql.org/docs/current/functions-binarystring.html#FUNCTIONS-BINARYSTRING-CONVERSIONS

Regards

Pavel

> regards
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ganesh Korde 2021-02-22 08:52:21 Re: Streaming replication between different OS
Previous Message Yambu 2021-02-22 06:36:41 converting text to bytea