Re: Coping with 'C' vs 'newC' function language names

From: "'Marko Kreen'" <marko(at)l-t(dot)ee>
To: Zeugswetter Andreas SB <ZeugswetterA(at)wien(dot)spardat(dot)at>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "'Bruce Momjian'" <pgman(at)candle(dot)pha(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Coping with 'C' vs 'newC' function language names
Date: 2000-11-15 14:03:26
Message-ID: 20001115160326.B4600@l-t.ee
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Nov 15, 2000 at 02:42:24PM +0100, Zeugswetter Andreas SB wrote:
>
> > > We need the 7.0 style for compatibility with other DB's. Postgres was
> > > "the" pioneer in this area, but similar functionality is now available in other DB's.
> >
> > Could you explain? PostgreSQL cant be compatible in C level, why
> > the SQL compatibility? (I mean the LANGUAGE 'C' specifically)
>
> C code compatible with Informix:
>
> int32 intadd (int32 a, int32 b)
> {
> return a + b;
> }
>
> This is the same code that was standard in PostgreSQL 7.0

Hmm, I have not actually researched if 7.1 supports 7.0 'C' code
or not. Butthe 'newC' is anyway incompatible with 'C'. So:

* CREATE FUNCTION .. AS 'foo.so', .. LANGUAGE 'C';

creates the old¬ 'C', 7.0 and ifnormix compatible funtion.

And it is documented as deprecated, for-compatibility.

* CREATE FUNCTION .. FROM LIBRARY 'foo.so.2' ..{name in .so}
[WITH VERSION abi_ver]
{the actual syntax needs polishing}

creates by default the newC style fn's
but WITH VERSION 0 (e.g.) you can create the old style
functions too.

Comments?

--
marko

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message mlw 2000-11-15 14:05:19 Re: [HACKERS] Re: PHPBuilder article -- Postgres vs MySQL
Previous Message Zeugswetter Andreas SB 2000-11-15 13:42:24 AW: Coping with 'C' vs 'newC' function language names