Unix Technical Forum

SPI

This is a discussion on SPI within the Pgsql General forums, part of the PostgreSQL category; --> Hi all,     I have some doubts about SPI (Server Programming Interface). In fact, I must create Stored Procedures ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-09-2008, 01:23 PM
Danilo Freitas da Costa
 
Posts: n/a
Default SPI

Hi all,

    I have some doubts about SPI (Server Programming Interface). In fact, I must create Stored Procedures in Postgres (8.0). The problem is: all stored procedures and, may be, some triggers must be compiled 'cause the clients can't access the source code of them.
    To solve this problem, the solution that I was found is create the procedures (functions) in C with SPI to access the database.
    Now, the functions are writed in plgpsql. There are another ways to compile the code? If not, someone there are samples how can I use C with SPI?

Regards,
Danilo
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-09-2008, 01:25 PM
Tomas Vondra
 
Posts: n/a
Default Re: SPI

> Hi all,
>
> I have some doubts about SPI (Server Programming Interface). In
> fact, I must create Stored Procedures in Postgres (8.0). The problem is:
> all stored procedures and, may be, some triggers must be compiled 'cause
> the clients can't access the source code of them.
> To solve this problem, the solution that I was found is create the
> procedures (functions) in C with SPI to access the database.
> Now, the functions are writed in plgpsql. There are another ways to
> compile the code? If not, someone there are samples how can I use C with
> SPI?


No, I'm not aware about any other way to obfuscate the source code. If
you are looking for some basic examples of procedures / functions
written in C, see this

http://www.postgresql.org/docs/8.1/i...e/xfunc-c.html
http://www.postgresql.org/docs/8.1/i...interface.html

But sure - that's just the basics.

Tomas

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
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
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:09 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com