dbTalk Databases Forums  

[BUGS] BUG #2292: Calling conventions in docs

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] BUG #2292: Calling conventions in docs in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Adriaan van Os
 
Posts: n/a

Default [BUGS] BUG #2292: Calling conventions in docs - 03-01-2006 , 12:56 PM







The following bug has been logged online:

Bug reference: 2292
Logged by: Adriaan van Os
Email address: pgres (AT) microbizz (DOT) nl
PostgreSQL version: 8.1
Operating system: Mac OS X
Description: Calling conventions in docs
Details:

Section 32.9.5. Writing Code of the 8.1 docs says:

Quote:
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.

Sincerely,

Adriaan van Os
<http://www.microbizz.nl/gpc.html>

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster


Reply With Quote
  #2  
Old   
Bruno Wolff III
 
Posts: n/a

Default Re: [BUGS] BUG #2292: Calling conventions in docs - 03-01-2006 , 01:09 PM






On Wed, Mar 01, 2006 at 13:08:17 +0000,
Adriaan van Os <pgres (AT) microbizz (DOT) nl> wrote:
Quote:
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.

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org


Reply With Quote
  #3  
Old   
Adriaan van Os
 
Posts: n/a

Default Re: [BUGS] BUG #2292: Calling conventions in docs - 03-02-2006 , 07:26 AM



Bruno Wolff III wrote:

Quote:
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


---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.