On Sat, Jun 9, 2012 at 1:09 PM, Kevin Grittner
<Kevin.Grittner@wicourts.gov> wrote:
> Simon Riggs wrote:
>> On 9 June 2012 16:46, Tom Lane wrote:
>>> Simon Riggs writes:
>>>> Add ERROR msg for GLOBAL/LOCAL TEMP is not yet implemented
>>>
>>> I don't believe there was actual consensus for this change,
>>
>> It was hardly a subject of marked disagreement.
>
> Regarding GLOBAL, the three comments so far have been along the same
> lines. But I assumed this was a 9.3 discussion.
I assumed it was a 9.2 discussion.
>> Why would we do it for GLOBAL but not LOCAL also?
>
> Because the current support for temporary tables is relatively
> similar to the standard's description of LOCAL TEMPORARY TABLES, but
> nothing at all like the standard's descri0ption of GLOBAL TEMPORARY
> TABLES. Now, I would love for us to also support DECLARE LOCAL
> TEMPORARY TABLE, for a table for which the name would only be in
> scope within a given code block, but that wouldn't require breaking
> the existing syntax, as far as I can see.
+1. I definitely see no point in complaining about LOCAL TEMP.
> In terms of roll-out, I think a warning for at least a release or two
> before actually throwing an error would make sense, even for GLOBAL.
> If we seriously think that global temporary tables might be a 9.3
> item, maybe a notice or warning in 9.2 could be justified; but we are
> on the second beta, so we need a pretty solid reason for any
> behavioral change at this point.
I am not sure that an ERROR on GLOBAL TEMP will break very much; there
is little reason for anyone to be using that syntax. However, a
WARNING is OK with me, too.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company