In article <[EMAIL PROTECTED]>,
Martin Gainty <[EMAIL PROTECTED]> wrote:
% Assuming your schema will be pg_temp_1
Not a particularly reasonable assumption...
% vi InitialTableDisplayStatements.sql
% select * from pg_tables where pg_namespace = 'pg_temp1';
pmcphee=# select * from pg_tables wher
In stored procedures I used something like
BEGIN
CREATE TEMPORARY TABLE tmp ...
EXCEPTION
WHEN ... THEN ...
END
See pg error codes for details (I don't remember exactly, but maybe it is a
dumplicate_table or duplicate_object exception).
On 3/25/07, Tom Lane <[EMAIL PROTECTED]> wrote:
"d
"dfx" <[EMAIL PROTECTED]> writes:
> how I can check the existance of temporary table?
> I.e. wich query I have to use to know if MY_TEMP_TABLE exists?
As of 8.2 you can do
SELECT ... FROM pg_class
WHERE relname = 'whatever' AND relnamespace = pg_my_temp_schema();
In earlier releases pg_my_tem
tement interdit
de le diffuser, de le distribuer ou de le reproduire.
- Original Message -
From: "dfx" <[EMAIL PROTECTED]>
To:
Sent: Sunday, March 25, 2007 8:32 AM
Subject: [GENERAL] Check the existance of temporary table
> Dear Sirs,
>
> how I can check the exista
Dear Sirs,
how I can check the existance of temporary table?
I.e. wich query I have to use to know if MY_TEMP_TABLE exists?
IF EXISTS(??? query ???) THEN
Thank you in advance
Domenico
---(end of broadcast)---
TIP 1: if posting/reading through Us