Questions tagged [bytea]

Variable-length binary string type in PostgreSQL

189 questions
0
votes
1 answer

whats the use of storing image name while saving image into bytea column in postgresql?

I am storing images into bytea column in postgresql my doubt is there any use if i store the file name example(tree.jpeg) into DB. Anyhow i'm able to display images in jsp which are stored in bytea column without its file name. so whats the use of…
Sandeep
  • 11
  • 5
0
votes
0 answers

Grails - show File image in tag?

I'm having an issue when showing an image on or tags. I have an image that is stored in pg database, (BYTEA) but I just can't get it working... I have already tried ',' and some…
xSlok
  • 589
  • 8
  • 23
0
votes
1 answer

How to write and read binary data with RPostgresql

I am trying to execute the code: Connect to the server library('RPostgreSQL', quietly = TRUE) kHostName <- '...' kPort <- '5432' kDBName <- '...' kUser <- '...' kPassword <- '...' drv <- dbDriver("PostgreSQL") con <- dbConnect(drv, …
dStack
  • 73
  • 1
  • 7
0
votes
1 answer

HTML/PHP/ODBC/PGSQL Base64 Image not displayed completely

I'm currently experiencing a weird problem while I converted a web application to ODBC using PostgreSQL (coming from MySQL with PHP mysqli-connector). I noticed that images that are stored as a bytea in PostgreSQL database and thrown into PHP's…
0
votes
0 answers

mysql_fdw input syntax error

I am implementing mysql_fdw in PostgreSQL (9.4.4). I have created foreign table and they are working fine except for one thing: For some of the rows in column idvisitor with datatype bytea, it is throwing the following error ERROR: invalid input…
zen
  • 93
  • 1
  • 4
0
votes
0 answers

How to insert multiple dummy records with same data for column of type bytea in PostgreSQL?

I want to insert 10000 records into Postgresql. Columns - bytea (Primary key), varchar, varchar Primary key should be different for each row. How can I do it using insert query or pgscript?
0
votes
3 answers

postgresql update a bytea field with image from desktop

I'm trying to write an update sql statement in postgresql (pg commander) that will update a user profile image column I've tried this: update mytable set avatarImg = pg_read_file('/Users/myUser/profile.png')::bytea where userid=5; got ERROR: …
liv a
  • 3,232
  • 6
  • 35
  • 76
0
votes
0 answers

Error when trying to save image in PostgreSQL - syntax error at or near "\" at character 823

I am trying to save an image to PostgreSQL with byte data type. I am using JSP to convert image -> bytes according to the documentation. All syntax in Java is correct but when I execute ps.executeUpdate(); PostgreSQL returns syntax error at or near…
0
votes
1 answer

How do I insert/retrieve .mat( matlab ) files from postgres database in python?

After looking around, I wrote this insertion/retrieval code to read in a .mat file, send it off to a bytea postgres database column, and then try and retrieve it and recreate the file. I use psycopg2 for database interaction. Insertion: …
Carthage
  • 87
  • 1
  • 7
0
votes
2 answers

pqxx byteA and binaryString weird data reading

im having some troubles with a PostGreSQL database and some cyphered data. Im usin a blowfish algorithm to encrypt strings, obtaining binray data in return. This binary can contain \0 and some other scape sequences. I store the data this way:…
Xeyos
  • 33
  • 1
  • 6
0
votes
1 answer

bytea in postgres not correctly escaped?

I have problems with copying bytea data in trigger from one table to another. The original query looks like: INSERT INTO "mytable" ("dataid","data") VALUES…
Natalie
  • 441
  • 1
  • 6
  • 17
0
votes
1 answer

Postgresql plperlu and encodings

I want to generate a PDF in plperlu, store it in the database and then add it to an email as an attachment. I am using PDF::Report to generate the PDF. The code looks like this:- CREATE OR REPLACE FUNCTION workflow.make_pdf(report_template json,…
user1331131
  • 427
  • 6
  • 20
0
votes
1 answer

PostgreSQL bytea binary data inserting

Faced the following problem: inserting some binary data from the App to "bytea" field in our PostgreSQL 9.2 DB, we found out, that its length is doubled. The App is written in C++ and uses SQL API library to access Postgres. Reference to official…
xacinay
  • 881
  • 1
  • 11
  • 29
0
votes
0 answers

PGSQL JDBC BLOB Update giving error

I have previously downloaded some files and stored them in a PGSQL database. I have used 'bytea' type for the 'content' column where I store the file content as a binary stream. Now, if the file has been updated (at the original source that hosts…
Rocky Inde
  • 1,511
  • 1
  • 20
  • 27
0
votes
1 answer

How to Store the Images into PostgreSQL using wso2esb and wso2dss

I am using wso2esb4.7.0 , wso2dss 3.0.1 and posgresql 9.1.4 In postgresql i used data type bytea and in wso2dss 3.0.1 we dont have bytea so i used binary data type while i am inserting via dss it inserting the values but selecting query is not…
Faisal
  • 1,469
  • 2
  • 13
  • 25
1 2 3
12
13