Variable-length binary string type in PostgreSQL
Questions tagged [bytea]
189 questions
0
votes
1 answer
I want to store PDF using postgresql bytea in Node.js
I want to store PDF using PostgreSQL bytea in Node.js
How can I convert PDF to datatype bytea ?
My code is:
request.get('https://www.cbconnexus.com/upload/settings/black/data.pdf', function (error, response, body) {
if (!error &&…

md pervez
- 71
- 7
0
votes
1 answer
Postgre drop bytea[] colum take very long
i have a problem with dropping a bytea[] column from my postgree database.
First: The column had a size of 1.4GB so i set the column to null => Update XX set BYTACOLUMN = null.
Result => The column have the same size 1.4GB. This is a litte bit…

Kevin V
- 129
- 2
- 9
0
votes
1 answer
REST Uploading/downloading large file with Spring boot/JPA, Postgres
I'm trying to upload ~700MB file and download the same through REST API in Spring boot with Postgres as database. I know Postgres is not the way to go but still, I'm trying to solve it as it is.
REST upload works after I added -Xmx2024m to VM while…

Boris Šipoš
- 61
- 2
0
votes
2 answers
Panda's DataFrame dump to CSV file is not decoding values correctly. It has Bytea data as columns
I have a complex table structure in the Database, which I am reading Panda's DataFrame. While printing DataFrame everything is printing correctly but when I dump in CSV or convert it to a list (each of DataFrame row as list) I see the following data…

mritunjay kumar
- 1
- 1
0
votes
2 answers
Converting a zip file to bytea to store in postgres - python
I would like to store zip files in a postgres database using python.
It seems like this should be easy, but I can't work it out.
This is what I've tried - my issue is how to convert the zipfile to a bytea object.
from zipfile import ZipFile
from io…

yahop19531
- 193
- 1
- 11
0
votes
1 answer
Receive bytea with asp .net api
First of all, sorry for the probable English mistakes
I created a table in my postgresql database using the entity framework.
In edmx in the creation section I passed as bytea, however in the mapping I used binary (primitive type use is…

mribeiro
- 197
- 11
0
votes
1 answer
postgresql sql query syntax error at or near "convert_from" in python
i think this is easy question, how to write sql query in python?
### python3 code
# ok
row = await conn.fetchrow(
'SELECT * FROM users WHERE email = $1', user_email)
# NOT ok
user_pw = await conn.fetch( …

sailfish009
- 2,561
- 1
- 24
- 31
0
votes
2 answers
How can I convert an escaped string to a bytea in postgresql (\ is not a binary digit) with Azure Data Studio
This is probably a duplicate but I've been unable after quite some time to actually find out how to do this.
What I'm trying to do is simply roundtrip a binary value. I select it, then paste it into another SQL query.
I.e.
I have a table with…

Orion Edwards
- 121,657
- 64
- 239
- 328
0
votes
1 answer
Query the length of a bytea value from PostgreSQL with EF Core
In my .NET Core application with Entity Framework Core and Npgsql, I'd like to query records that contain binary data. But sometimes I don't need the actual data but just its length in bytes. That would be something like this…

ygoe
- 18,655
- 23
- 113
- 210
0
votes
1 answer
How to copy data from Netezza DEFINITION_SCHEMA [ignoring the bytea error]
I am trying to analyse the code used in the stored procs on our Netezza server.
First step is to get the definitions/code contained in the stored procs - this can easily be done by either of the following:
Using the system views
select
…

Cor Basson
- 43
- 1
- 5
0
votes
0 answers
Postgresql how to keep a user defined type and it's underlying bytea in the same table?
I want (for some reason) to store data as a bytea (binary blob, let's say it's a C struct memory dump, or an ASN.1 encoded record, as dumb and a bad idea as it sounds) and allow access to it via a user-defined types (coded in C, calling the…

Touisteur EmporteUneVache
- 111
- 1
- 8
0
votes
1 answer
is there a special Postgresql Bytea data type in Sequel?
I know that Sequel have BLOB type for byte data, but there is some difference between BLOB and bytea. Is it possible to use bytea directly with Sequel?

Aleks Boev
- 630
- 1
- 7
- 16
0
votes
1 answer
Error when trying to save image in PostgreSQL 9.6.13 - syntax error at or near “\”, but finely store PostgreSQL 8.2.23
I have problem to store image in postgresql 9.6.13 version in my table column data type bytea format, but this data type bytea finely run on postgresql 8.2.23 version.

Dinesh Palani
- 1
- 2
0
votes
1 answer
Java read byte array from PostgreSQL and write to image file
I need to read an image byte array from a PostgreSQL table which is done as
byte[] fileBytes = resultsSet.getBytes(1);
When I try to write it to a image file, it does not open (unsupported file type). The following is the code
FileOutputStream fos…

S_S
- 1,276
- 4
- 24
- 47
0
votes
1 answer
How to insert array of bytes in PostgreSQL table via libpq C++ API
I am trying to update table
CREATE TABLE some_table
(
id integer NOT NULL,
client_fid bigint NOT NULL,
index bytea[],
update_time timestamp without time zone
)
WITH (
OIDS = FALSE
using modified code snipped from here How to…

Eugene Kotyashov
- 3
- 4