Insert and Retrieve unsigned char sequences using C

From: vinicius_bra <viniciusams(at)yahoo(dot)com(dot)br>
To: pgsql-general(at)postgresql(dot)org
Subject: Insert and Retrieve unsigned char sequences using C
Date: 2010-07-20 00:14:36
Message-ID: 29210308.post@talk.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Hi All,

I'm developing a system in C and I have a unsigned char pointer that
represents a struct and I like to store it in a bytea column in postgreSQL.
How can I do it?
Example:

str_t temp;
unsigned char *ptr;
ptr = (unsigned char *)&temp;
store(ptr);

I've already tried some examples, but I didnt have success.
Could you help me?

Thanks!

--
View this message in context: http://old.nabble.com/Insert-and-Retrieve-unsigned-char-sequences-using-C-tp29210308p29210308.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Lew 2010-07-20 01:49:32 Re: Insert and Retrieve unsigned char sequences using C
Previous Message Joe Conway 2010-07-19 20:55:38 Re: Create table if not exists ... how ??