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

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Marko Kreen <marko(at)l-t(dot)ee>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Philip Warner <pjw(at)rhyme(dot)com(dot)au>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Coping with 'C' vs 'newC' function language names
Date: 2000-11-12 02:15:44
Message-ID: 200011120215.VAA01005@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> > No. 'C' is really a misnomer, since it does NOT imply anything about
> > whether the code is in C or not --- in theory you could use any language
> > that's link-compatible with C. What LANGUAGE 'C' really implies is
> > "dynamically linked, compiled function following fmgr interface
> > convention #1"", as opposed to (for example) LANGUAGE 'internal' which
> > implies "statically linked, compiled function following fmgr interface
> > convention #1". Nothing about language at all.
>
> Maybe the construct
>
> CREATE FUNCTION foo(..) RETURNS ...
> AS '../foo.so' LANGUAGE 'C';
>
> would be cleaner as
>
> CREATE FUNCTION foo(..) RETURNS ...
> FROM '../foo.so', 'pg_foo' [[WITH] VERSION abi_ver];
>
> or with more noise:
>
> FROM [LIBRARY] '../foo.so' AS 'pg_foo' [[WITH] VERSION abi_ver];
>
> because as said, it can be any other language besides C and also
> the 'AS file' is weird.

This is interesting. It allows us to control the default behavour of
"C". I would vote to default to 7.0-style when no version is used for
7.1, then default to 7.1 style in 7.2 and later. We don't need
backward C function compatibility for more than one release, I think.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Philip Warner 2000-11-12 02:43:56 Re: Coping with 'C' vs 'newC' function language names
Previous Message Marko Kreen 2000-11-12 02:01:08 Re: Coping with 'C' vs 'newC' function language names