Re: [GENERAL] Stored procedures in C

2008-04-24 Thread Emiliano Moscato
Thanks a lot for the response Andrej! One of these texts was known for me. But all of them are VERY basic. No one explains how to do a query and manage results :( The only one that manage querys is the source code placed at contrib/tablefunc in the Postgres distribution. But is VERY hard to

Re: [GENERAL] Stored procedures in C

2008-04-24 Thread Martin Gainty
@postgresql.org Sent: Thursday, April 24, 2008 8:44 AM Subject: Re: [GENERAL] Stored procedures in C Thanks a lot for the response Andrej! One of these texts was known for me. But all of them are VERY basic. No one explains how to do a query and manage results :( The only one

Re: [GENERAL] Stored procedures in C

2008-04-24 Thread Merlin Moncure
On Wed, Apr 23, 2008 at 6:38 PM, Martin Gainty [EMAIL PROTECTED] wrote: Emiliano and Mike The real challenge is trying to determine what a datatype is in cobol..for that matter what is stack variable or heap in Cobol? In the end you're better off rewriting this mess (preferably in Java)..

Re: [GENERAL] Stored procedures in C

2008-04-24 Thread Emiliano Moscato
Guys, it has nothing to do with my question :D I don't know why Martin answer to me anything about Cobol. I just was looking how to query database in a stored procedure in C. Some people pointed me to SPI documentation (at chapter 41 of oficial Postgres documentation) that is being useful. Thanks

[GENERAL] Stored procedures in C

2008-04-23 Thread Emiliano Moscato
Hi all, I have to do some stuff writing stored procedures for Postgres in C. I saw the oficial documentation but it was hard for me to find out how to do a simple function, let's call it query() , that receives a string and uses this string to do a query and return the results. Has anyone some

Re: [GENERAL] Stored procedures in C

2008-04-23 Thread Martin Gainty
then later rewrite to Java (That should get you at least 2 weeks worth of work..) Buena Suerte/Good Luck Martin - Original Message - From: Emiliano Moscato To: pgsql-general@postgresql.org Sent: Wednesday, April 23, 2008 3:32 PM Subject: [GENERAL] Stored procedures in C Hi all

Re: [GENERAL] Stored procedures in C

2008-04-23 Thread Andrej Ricnik-Bay
On 24/04/2008, Emiliano Moscato [EMAIL PROTECTED] wrote: I have to do some stuff writing stored procedures for Postgres in C. I saw the oficial documentation but it was hard for me to find out how to do a simple function, let's call it query() , that receives a string and uses this string to