postgresql - how to pass an image as paramenter to sql function -


i quality analysts , got task test database function n_execute() takes 3 parameters 1. image_name 2. image_data (byte array) blob type. 3. data_created problem test function want call function don't know how input iamge o second parameter of function. know can writing java code calls function wants execute through sql editor only.

you haven't mentioned database platform working in sql server t/sql script image data binary constant. simple example 0x0102030405 represents 5 hex bytes; 01, 02, 03, 04 , 05.

edit postgresql

for postgresql take @ docs, binary data types. note;

the bytea type supports 2 external formats input , output: postgresql's historical "escape" format, , "hex" format.

the postgresql equivalent sql server example e'\\x0102030405'.


Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

[C++][SFML 2.2] Strange Performance Issues - Moving Mouse Lowers CPU Usage -

ios - Possible to get UIButton sizeThatFits to work? -