VARDATA strangness!!!

From: Lonnie Cumberland <lonnie_cumberland(at)yahoo(dot)com>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: VARDATA strangness!!!
Date: 2001-04-17 22:18:10
Message-ID: 20010417221810.17804.qmail@web12508.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Hello All,

I have been working very hard to try and figure out how to get my existing
functions to work in my Postgresql "C" extensions.

I have run across something strange I think.

My original functions have a prototype like:

string EncryptString(const char *plaintext, const char *passPhrase);
string DecryptString(const char *ciphertext, const char *passPhrase);

and my extencions file is trying to get them in the form:

// These are the DES Crypto functions
text *desencrypt(text *plaintext, text *passPhrase);
text *desdecrypt(text *ciphertext, text *passPhrase);

The problem is that I cannot seem to get the VARDATA and VARSIZE to work
correctly and the VARSIZE always seems to be 4 bytes longer for each of the
input variables.

Does anyone have any ideas?

I tried to work along the copy_text() demo in the funcs.c example but this does
not seem to work.

In anycase, inside my existing functions, I need to be able to work with "char
*plaintext", "char *ciphertext", and "char *passPhrase"

How can I encapsulate my existing functions for this with "text *" inputs.

Cheers :( :( :( :( :( :(

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Lonnie Cumberland 2001-04-17 23:30:43 Where are the 7.1 RPM's?
Previous Message Lamar Owen 2001-04-17 16:10:09 Re: perl install problem with pg7.1