Thread: C-Extenions for PostgreSQL, Call Convention Version 0
Hello, I am researching information about writing C-language-Functions for PostgreSQL. I came accross the slides of an OSCON 2004 tutorial of Joe Conway http://www.joeconway.com/tut_oscon_2004.pdf where he states: Version 0 Calling Convention • Deprecated • Has been since the 7.1 release. • Don't use it. Within the PostgreSQL-Documentation for 8.2, http://www.postgresql.org/docs/8.2/interactive/xfunc-c.html, still I find: """Using call conventions version 0, we can define c_overpaid as:""" That sound very tutorial-like; and so $I wonder: is those version 0 depreciated? Or ist there still value in learning it? Harald -- GHUM Harald Massa persuadere et programmare Harald Armin Massa Spielberger Straße 49 70435 Stuttgart 0173/9409607 fx 01212-5-13695179 - EuroPython 2008 will take place in Vilnius, Lithuania - Stay tuned!
Hello version 0 Calling Convention is really deprecated. From 8.2 manual: We present the "old style" calling convention first — although this approach is now deprecated, it's easier to get a handle on initially. Regards Pavel Stehule On 03/01/2008, Harald Armin Massa <haraldarminmassa@gmail.com> wrote: > Hello, > > I am researching information about writing C-language-Functions for > PostgreSQL. I came accross the slides of an OSCON 2004 tutorial of > Joe Conway > http://www.joeconway.com/tut_oscon_2004.pdf > > where he states: > Version 0 Calling Convention > • Deprecated > • Has been since the 7.1 release. > • Don't use it. > > Within the PostgreSQL-Documentation for 8.2, > http://www.postgresql.org/docs/8.2/interactive/xfunc-c.html, still I > find: > > """Using call conventions version 0, we can define c_overpaid as:""" > > That sound very tutorial-like; and so $I wonder: is those version 0 > depreciated? Or ist there still value in learning it? > > > Harald > > -- > GHUM Harald Massa > persuadere et programmare > Harald Armin Massa > Spielberger Straße 49 > 70435 Stuttgart > 0173/9409607 > fx 01212-5-13695179 > - > EuroPython 2008 will take place in Vilnius, Lithuania - Stay tuned! > > ---------------------------(end of broadcast)--------------------------- > TIP 3: Have you checked our extensive FAQ? > > http://www.postgresql.org/docs/faq >
"Harald Armin Massa" <haraldarminmassa@gmail.com> writes: > Within the PostgreSQL-Documentation for 8.2, > http://www.postgresql.org/docs/8.2/interactive/xfunc-c.html, still I > find: > """Using call conventions version 0, we can define c_overpaid as:""" > That sound very tutorial-like; and so $I wonder: is those version 0 > depreciated? Or ist there still value in learning it? That's just for teaching purposes. As it says further up the page: : We present the "old style" calling convention first � although this : approach is now deprecated, it's easier to get a handle on initially. The examples are given in both styles so that you can get the point of what's happening before you deal with the notational overhead of version 1. For any sort of production programming I'd definitely recommend using version 1, though. regards, tom lane