From: | "Paul" <magamos(at)mail(dot)ru> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Transaction on start of session ? |
Date: | 2002-03-10 14:22:59 |
Message-ID: | a6fq6k$26jk$1@jupiter.hub.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
The problem:
I want to create a function that returns the result as many tuples (many
rows of records). Unlike MSSQL, Oracle, etc PostgreSQL couldnt do it. So, I
decided the only way to do it is to return result data into temporary table.
But:
- If I create table into stored procedure, I got the error from the second
call of this procedure inside the same session. It's because Plpgsql makes
precompilation of the query at the first call of this procedure inside the
session. And when I delete the result temporary table that this procedure
returned me and call this procedure second time, the query with "INSERT"
(that is already precompiled) uses the table that was already deleted, but
not the table that was just created. :(
- I couldnt check is some temporary table exist inside the session. :(
The way I could decide this problem is:
- At each start of session some stored procedure must run (as some kind of
transaction). And in this stored procedure I want to create all temporary
tables that I want to use to store resulting rows from other stored
procedures. And I shall not need to create any temporary table inside these
procedures.
From | Date | Subject | |
---|---|---|---|
Next Message | ngterry | 2002-03-10 15:40:40 | re: REFERENCES |
Previous Message | Dave | 2002-03-10 14:11:11 | Postgres not starting at boot(FreeBSD) - startup script not releasing |