2010/9/30 Vincenzo Romano :
> 2010/9/30 Tom Lane :
>> Vincenzo Romano writes:
>>> create or replace function session_init()
>>> returns void
>>> language plpgsql
>>> as $body$
>>> declare
>>> t text;
>>> begin
>>> select valu into t from session where name='SESSION_ID';
>>> if not found then
--- On Thu, 9/30/10, Vincenzo Romano wrote:
From: Vincenzo Romano
Subject: [GENERAL] [9.0] On temporary tables
To: "PostgreSQL General"
Date: Thursday, September 30, 2010, 11:09 AM
Hi all.
This is my case:
-- begin snippet --
reset search_path;
drop table if exists session casca
2010/9/30 Vincenzo Romano :
> 2010/9/30 Pavel Stehule :
>> 2010/9/30 Vincenzo Romano :
>>> 2010/9/30 Pavel Stehule :
Hello
>> but if you need a session variables, then you can use a plperl
>>
>> http://www.postgresql.org/docs/9.0/static/plperl-global.html
>
> I will look in
2010/9/30 Pavel Stehule :
> 2010/9/30 Vincenzo Romano :
>> 2010/9/30 Pavel Stehule :
>>> Hello
> but if you need a session variables, then you can use a plperl
>
> http://www.postgresql.org/docs/9.0/static/plperl-global.html
I will look into this. What I need is a set of varia
2010/9/30 Vincenzo Romano :
> 2010/9/30 Pavel Stehule :
>> Hello
but if you need a session variables, then you can use a plperl
http://www.postgresql.org/docs/9.0/static/plperl-global.html
>>>
>>> I will look into this. What I need is a set of variable for each connection.
>>>
>>
>>
2010/9/30 Pavel Stehule :
> Hello
>>> but if you need a session variables, then you can use a plperl
>>>
>>> http://www.postgresql.org/docs/9.0/static/plperl-global.html
>>
>> I will look into this. What I need is a set of variable for each connection.
>>
>
> understand - attention - session variab
Hello
2010/9/30 Vincenzo Romano :
> 2010/9/30 Pavel Stehule :
>> Hello
>>
>> 2010/9/30 Tom Lane :
>>> Vincenzo Romano writes:
create or replace function session_init()
returns void
language plpgsql
as $body$
declare
t text;
begin
select valu into t from
2010/9/30 Andy Colson :
> On 9/30/2010 8:52 AM, Vincenzo Romano wrote:
>>
>> I was also thinking about using the catalog, but it looked to me
>> "easier" my way.
>> And, of course, if you have better advises for a "session variables"
>> solution, my ears are open.
>
> More of a question: why use te
you can pass in/out very large set of data inside a transaction by
using temp tables. Temporary tables are one of the greatest features
of SQL dbs.
Here's one fact, it most often takes as long to transfer data from/to
a query/function as it takes to execute it. By storing data on the
server side, y
On 9/30/2010 8:52 AM, Vincenzo Romano wrote:
I was also thinking about using the catalog, but it looked to me
"easier" my way.
And, of course, if you have better advises for a "session variables"
solution, my ears are open.
More of a question: why use temp tables at all? What does that offer
2010/9/30 Pavel Stehule :
> Hello
>
> 2010/9/30 Tom Lane :
>> Vincenzo Romano writes:
>>> create or replace function session_init()
>>> returns void
>>> language plpgsql
>>> as $body$
>>> declare
>>> t text;
>>> begin
>>> select valu into t from session where name='SESSION_ID';
>>> if not fo
Hello
2010/9/30 Tom Lane :
> Vincenzo Romano writes:
>> create or replace function session_init()
>> returns void
>> language plpgsql
>> as $body$
>> declare
>> t text;
>> begin
>> select valu into t from session where name='SESSION_ID';
>> if not found then
>> create temporary table se
2010/9/30 Tom Lane :
> Vincenzo Romano writes:
>> create or replace function session_init()
>> returns void
>> language plpgsql
>> as $body$
>> declare
>> t text;
>> begin
>> select valu into t from session where name='SESSION_ID';
>> if not found then
>> create temporary table session (
Vincenzo Romano writes:
> create or replace function session_init()
> returns void
> language plpgsql
> as $body$
> declare
> t text;
> begin
> select valu into t from session where name='SESSION_ID';
> if not found then
> create temporary table session ( like public.session including al
Hi all.
This is my case:
-- begin snippet --
reset search_path;
drop table if exists session cascade;
create table session ( name text primary key, valu text not null );
create or replace function session_init()
returns void
language plpgsql
as $body$
declare
t text;
begin
select valu into t
15 matches
Mail list logo