Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e9m1C-0000vJ-Np for pgsql-hackers@arkaria.postgresql.org; Wed, 01 Nov 2017 05:56:50 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1e9m1C-00038S-AY for pgsql-hackers@arkaria.postgresql.org; Wed, 01 Nov 2017 05:56:50 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1e9m1B-000379-7b for pgsql-hackers@postgresql.org; Wed, 01 Nov 2017 05:56:49 +0000 Received: from mail-wm0-x22e.google.com ([2a00:1450:400c:c09::22e]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1e9m17-0001UN-I9 for pgsql-hackers@postgresql.org; Wed, 01 Nov 2017 05:56:48 +0000 Received: by mail-wm0-x22e.google.com with SMTP id r196so2812325wmf.2 for ; Tue, 31 Oct 2017 22:56:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=o2eD40t7hrc7wO5bbR1ETzTOd4u71YVSuaNsrvPX4Z8=; b=TNaM+CjNJciQF7A5iAJ9Jv6LMkhcXwEXKWCV63KWinB02eWtR6ktjhB2M9YumORgmI LPPp2H1FXreoHrzUCsdH6Y1f2UoGvq+WXh1nkGFSmJntGI9tElekleGMchLaOUx9cWVo ughT7S8GIodo2JwWEPSy4sfF58ToQ0uSTriuT9ZN97YJOwt4PU9GqVZLqaRkHFfOrHGh 8pnwEYOe7Mx0s4z7UXp3nvKnDt6DcEnAxpoMRfEBsOq76xZQfOUNAG4wlohYJAAqJqPx LQTeWZXFNdLg7+aNYHIcvO/grT3F4ayQhFGplPQ4HSVkf5SytNaNfqgb/LtLum05SgIx kJOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=o2eD40t7hrc7wO5bbR1ETzTOd4u71YVSuaNsrvPX4Z8=; b=QCqccs0noO6NQNj2j++VSxlnFnjhKhcqfV5Do0eSjDegVH8xo7PsFbe88zLebzgj8A xGATv2PmW4XVpbOgZBpxZw6pZqEerIqZrn7rKofw/Iz+lUgfbmHADe3zjrr99hkON8Iw DkRFYNrLcXnMlmKC/AvSu02S1fORaToUTH/3XpTv3/QXTGqz6o+EYiBeDpwvIIqXnRHh 9FCzw+M6s7JdtsQjSthi91d9UlZa92ldsqeW3TVFa+L0vpzGa9Fuq4GrOWl9JTjoGj98 dm3POf7cKQL6H6jYHGh4A8aiskkPpVORC9VrgbyucwKoQ0m4K42yk0uNQKd9JnsR3+Qe /igA== X-Gm-Message-State: AMCzsaWemY4gFEtFB2PnCk9GmI2mykl2GAmKgz3uqtXP9k1He4QcXVKV oCxC2ua0iBuqCmv1L6A+86tTJ5gzUXJM+1QZ8No= X-Google-Smtp-Source: ABhQp+TdG0qtODf7EvKxOc5V2kABHPWCY4npMf2ns3OMxkFhPanGzWNxanCBIsfMXV15j7iRnLU2wILmc2mL2AxGpaA= X-Received: by 10.28.48.150 with SMTP id w144mr3497407wmw.23.1509515804342; Tue, 31 Oct 2017 22:56:44 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.146.7 with HTTP; Tue, 31 Oct 2017 22:56:03 -0700 (PDT) In-Reply-To: References: <20171026220732.GI4496@localhost> <1509399760322-0.post@n3.nabble.com> <5665be80-1772-4998-8dbc-3bd071c0d9ad@rielau.com> <1509485317393-0.post@n3.nabble.com> From: Pavel Stehule Date: Wed, 1 Nov 2017 06:56:03 +0100 Message-ID: Subject: Re: proposal: schema variables To: Serge Rielau Cc: PostgreSQL Hackers Content-Type: multipart/alternative; boundary="001a1142427e4d06ea055ce589e6" List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org --001a1142427e4d06ea055ce589e6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 2017-11-01 6:07 GMT+01:00 Serge Rielau : > "Although the syntax of CREATE TEMPORARY TABLE resembles that of the SQL > standard, the effect is not the same. In the standard, temporary tables a= re > defined just once and automatically exist (starting with empty contents) = in > every session that needs them. PostgreSQL instead requires each session > to issue its own CREATE TEMPORARY TABLE command for each temporary table > to be used. This allows different sessions to use the same temporary tabl= e > name for different purposes, whereas the standard's approach constrains a= ll > instances of a given temporary table name to have the same table structur= e.=E2=80=9D > Yeah, that=E2=80=99s a DECLAREd table in my book. No wonder we didn=E2=80= =99t link up. > This is known discussion about local / global temp tables in PostgresSQL. And ToDo point: implementation of global temp tables in Postgres. This temporary behave is marginal part of proposal - so I can to remove it from proposal - and later open discussion about CREATE TEMPORARY VARIABLE versus DECLARE VARIABLE Regards Pavel Serge > --001a1142427e4d06ea055ce589e6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


2017-11-01 6:07 GMT+01:00 Serge Rielau <serge@rielau.com>= :
"Although the syntax of=C2=A0= CREATE TEMPORARY TABLE=C2=A0resembles that of= the SQL standard, the effect is not the same. In the standard, temporary t= ables are defined just once and automatically exist (starting with empty co= ntents) in every session that needs them.=C2=A0PostgreSQL=C2=A0instead requires eac= h session to issue its own=C2=A0CREATE TEMPORARY TABLE=C2=A0command for each temporary table to be used. This allows dif= ferent sessions to use the same temporary table name for different purposes= , whereas the standard's approach constrains all instances of a given t= emporary table name to have the same table structure.=E2=80=9D
Yeah,=C2=A0that=E2=80=99s a DECLAREd table in my book. = No wonder we didn=E2=80=99t link up.
=

This is known discussion about local / global temp tabl= es in PostgresSQL. And ToDo point: implementation of global temp tables in = Postgres.

This temporary behave is ma= rginal part of proposal - so I can to remove it from proposal - and later o= pen discussion about CREATE TEMPORARY VARIABLE versus DECLARE VARIABLE

Regards

Pavel

Serge

--001a1142427e4d06ea055ce589e6--