Extending SQL with a C function

From: Christoph Lorenz <ChLorenz(at)csi(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Extending SQL with a C function
Date: 1998-05-22 09:59:48
Message-ID: ug1i24odn.fsf@haup42174.inhouse.compuserve.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

how can I write a SQL extention in C, which works with "unusual" data
types?

I've managed to write a c function, which accepts int4 as input parameter
and has got int4 as output parameter.

My problem now is, that I want to use a char(10) as input parameter, since
the input for that function is a colum, which is a char(10) type.
How do I do this?

(In the manuals, it is said, one should create an own data type in C - I've
already done this, called it "char10", but of course, I cannot use this
data type in SQL...)

Thank you very much
Christoph
--
** http://ourworld.compuserve.com/homepages/ChLorenz/ ** ChLorenz(at)csi(dot)com **
** No Spam ! ** No Adverts ! ** No Junk-Mails ! ** No unwanted Mails ! **

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Peter Mount 1998-05-22 10:07:23 RE: [HACKERS] error messages not only English
Previous Message Philip Bierhoff 1998-05-22 08:40:55 How to remove VACUUM lock?