Insert and Retrieve unsigned char sequences using C - Mailing list pgsql-general

From vinicius_bra
Subject Insert and Retrieve unsigned char sequences using C
Date
Msg-id 29210308.post@talk.nabble.com
Whole thread Raw
Responses Re: Insert and Retrieve unsigned char sequences using C  (Lew <noone@lewscanon.com>)
Re: Insert and Retrieve unsigned char sequences using C  (Lew <noone@lewscanon.com>)
Re: Insert and Retrieve unsigned char sequences using C  (Lew <noone@lewscanon.com>)
Re: Insert and Retrieve unsigned char sequences using C  (Merlin Moncure <mmoncure@gmail.com>)
List 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.


pgsql-general by date:

Previous
From: Joe Conway
Date:
Subject: Re: Create table if not exists ... how ??
Next
From: Lew
Date:
Subject: Re: Insert and Retrieve unsigned char sequences using C