From: wlj <wulijie(at)neusoft(dot)com>
To: PostgresGeneral <pgsql-general(at)postgresql(dot)org>
Subject:
Date: 2002-09-02 03:01:21
Message-ID: 01fb01c2522d$03f307a0$2327a8c0@tos1.nets.com.cn
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

how to use the bytea type of postgres in c language.
please give me a example.

i did it like this ,but it didn't work

...
FILE *file;
char ch[3000];

file=fopen("pic.jpg","r");
memset(cr.0,sizeof(cr);
fgets(cr,2999,file);
...
exec sql insert into table_test(1,:cr); //table_test(id numeric,file bytea)

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2002-09-02 04:36:08 Re: pgsql on jaguar (os x 10.2)
Previous Message Bruce Momjian 2002-09-02 02:50:30 Re: CREATE INDEX .. ON table1 (field1 asc, field2 desc)