Received: from web12508.mail.yahoo.com (web12508.mail.yahoo.com [216.136.173.200]) by postgresql.org (8.11.3/8.11.1) with SMTP id f3HMICu55504 for ; Tue, 17 Apr 2001 18:18:12 -0400 (EDT) (envelope-from lonnie_cumberland@yahoo.com) Message-ID: <20010417221810.17804.qmail@web12508.mail.yahoo.com> Received: from [141.217.140.65] by web12508.mail.yahoo.com; Tue, 17 Apr 2001 15:18:10 PDT Date: Tue, 17 Apr 2001 15:18:10 -0700 (PDT) From: Lonnie Cumberland Subject: VARDATA strangness!!! To: pgsql-interfaces@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Archive-Number: 200104/74 X-Sequence-Number: 1458 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/