[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
Re: Problem with recreation of session_info table
- To: uu@total-knowledge.com
- Subject: Re: Problem with recreation of session_info table
- From: "Alexey Parshin" <alexeyp@gmail.com>
- Date: Mon, 19 Mar 2007 16:04:44 +1100
- Delivered-to: mailing list uu@total-knowledge.com
- Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=UgLfPq6gL1pLkTvviv+MoWI5wbmpjCjADa2g0HNL/v4UDbyH684n9IlHYEOgl2l9Qg/Lr+1dYLGku09FJOF5WQnIOEQpvL4O3rGOLTQZ3LFwy9Qw6vUpYDj6jwYI3AwBzWVUDhIOAAjc3nng7q1Hu5PMS+X8WT1Yrtf4V0FADUA=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=CuOWva4xybvz2LZ3DxPAigdG4GIBKkjaFafhp05Udt1XTrXqmeSLvbm+9goYVVK6ygiJGvSBAG3KJSx5CJ7LEiaeV8BUBJuP7tC4j+Arkxq2hfZHr5UOLLRFoctYW2ODGLPSD7bnsUvhrAN7v77jI/Ba0UdaTS0KflbyVpUVOmQ=
- In-reply-to: <55600.76.83.147.118.1174275254.squirrel@webmail.total-knowledge.com>
- Mailing-list: contact uu-help@total-knowledge.com; run by ezmlm
- References: <55600.76.83.147.118.1174275254.squirrel@webmail.total-knowledge.com>
Can you send me the code that has that problem, as a tar archive?
2007/3/19, sergey@total-knowledge.com <
sergey@total-knowledge.com>:After I used logout() stored procedure I'm unable to recreate session_info
table.
Here is the error message which I get after
select login ('sergey', 'password12', 1);
-----
ERROR: relation with OID 37226 does not exist
CONTEXT: SQL statement "INSERT INTO session_info SELECT pl_id,
pl_first_name || ' ' || pl_last_name, $1 FROM person_list WHERE pl_login
= $2 "
PL/pgSQL function "login" line 27 at SQL statement
-----
I did some research and I found out that it could be related to PL/PgSQL
caching of function scripts. The solution is to use EXECUTE for temporary
table access. This should cause the query to be reparsed every time.
Here is what I did:
prepare testplan (varchar, varchar, int) as select login($1, $2, $3);
execute testplan('sergey', 'password12', 1);
but got exactly the same error message as above.
I guess it could be a mismatch between tables in DB b/c of 'drop' that
logout() proc performs.
Do we need to use prepared statements in stored procs to avoid this problem?
Another thing, I need session_info table with si_session column. I'll pass
session id as a parameter, as we agreed.
--
Alexey Parshin,
http://www.sptk.net