usage of spi_prepare from PL/Perl

From: paresh masani <masaniparesh(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: usage of spi_prepare from PL/Perl
Date: 2009-10-02 11:44:33
Message-ID: a9d94e070910020444r3a9b863bt85eaced2843b6db1@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi, I am new to PostgreSQL. I have started learning and written
triggers and they are working fine. Currently I am using spi_exe_query
to insert/update my log table when primary table updated. Could any
one please give me an example of spi_prepare and spi_execute_plan
usage in PL/Perl that I can use in my trigger. I couldn't find any
example in documentation.

Basically, I want to prepare a plan and want to store it in %_SHARED
hash so that I can use whenever I want. Moreover, if table definition
changed then I should purge the cache.

any suggestion would be much appreciated.

Thanks,
Paresh

Browse pgsql-novice by date

  From Date Subject
Next Message Brian Modra 2009-10-04 04:33:58 Re: Moving from MS SQL Server to PostgreSql 8.3
Previous Message Tom Lane 2009-10-01 16:25:08 Re: Connect to database with php pg_connect, cannot find table even though it shows up on psql connection