From: | Adriaan van Os <pgres(at)microbizz(dot)nl> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #2292: Calling conventions in docs |
Date: | 2006-03-02 09:53:16 |
Message-ID: | 7960e5777d6c91b05e5bbccb7d75777e@microbizz.nl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Bruno Wolff III wrote:
> Adriaan van Os <pgres(at)microbizz(dot)nl> wrote:
>>
>> Section 32.9.5. Writing Code of the 8.1 docs says:
>>
>>>> While it may be possible to load functions written in languages
>>>> other than
>> C into PostgreSQL, this is usually difficult (when it is possible at
>> all)
>> because other languages, such as C++, FORTRAN, or Pascal often do not
>> follow
>> the same calling convention as C. That is, other languages do not pass
>> argument and return values between functions in the same way<<
>>
>> This is nonsense. GNU Pascal and GNU C use the same calling
>> conventions. In
>> fact, they share the same compiler-backend.
>
> You seem to be assuming that Postgres will always be built using gcc.
> That
> isn't the case.
Note that the manual says "this is usually difficult (when it is
possible at all)". I don't think there are much C compilers around with
calling conventions that a Pascal compiler cannot reproduce. Name me
one ! Anyway, recompiling with gcc will solve the problem.
The manual is simply taking an old prejudice as a fact.
Sincerely,
Adriaan van Os
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2006-03-02 15:19:34 | Re: BUG #2295: MemoryContextSwitchTo missing |
Previous Message | Sudhakar | 2006-03-02 09:15:23 | BUG #2296: select query error. |