SPI_exec does not return! - Mailing list pgsql-sql

From Markus Wagner
Subject SPI_exec does not return!
Date
Msg-id 3B55445B.36E16A4@imsd.uni-mainz.de
Whole thread Raw
Responses Re: SPI_exec does not return!  (Jan Wieck <JanWieck@Yahoo.com>)
List pgsql-sql
Hi,

if I do a SELECT on a non-existing table, SPI_exec won't return.
I get, e. g. in pgaccess, an error message "<table> does not exist",
and my code below the function call is never reached.

So why return error codes for SPI_exec when you cannot evaluate them?

The background:

I need to distinguish different client connections within a trigger
function.
To do this, I create a temporary table within a "login" function.
My trigger must check for the existence of this function.
I cannot think of any other method, since there is no "connection id" or
something like that!

This would also be an application for checking the existance of a
temporary table,
as was asked for in another thread in this list before.

How can I check for the existence of a temporary table without getting
interuppted?????

Thanks,

Markus


pgsql-sql by date:

Previous
From: "Josh Berkus"
Date:
Subject: Re: PL/PGSQL and external (flat ASCII) files - Urgent ... :)
Next
From: Bhuvan A
Date:
Subject: Re: CAST(ipaddress as text) -- HOW?