Re: BUG #13993: Temp sequence does not seem to be properly deleted

Поиск
Список
Период
Сортировка
От Euler Taveira
Тема Re: BUG #13993: Temp sequence does not seem to be properly deleted
Дата
Msg-id 56D449FB.20604@timbira.com.br
обсуждение исходный текст
Ответ на BUG #13993: Temp sequence does not seem to be properly deleted  (mathias.zajaczkowski@ubik.ch)
Список pgsql-bugs
On 28-02-2016 17:08, mathias.zajaczkowski@ubik.ch wrote:
> Within a script I created temporary sequence:
> CREATE TEMP SEQUENCE 'rateSeq' with S in uppercase to be used for rate table
> pk.
You can't use single quotes. Instead, use double quotes.

$ psql -q
euler=# create temp sequence 'rateSeq';
ERROR:  syntax error at or near "'rateSeq'"
LINE 1: create temp sequence 'rateSeq';
                             ^
euler=# create temp sequence "rateSeq";
euler=# select relname from pg_class where relname ~ 'rate';
 relname
---------
 rateSeq
(1 row)

> Next time script gave an error "relation rateseq already exists".
> I modified the creation of the sequence  to:
> CREATE TEMP SEQUENCE rateseq (all in lower case)
> Same error when running the script.
> I tried: DROP SEQUENCE rateseq
> Result: sequence <<rateseq>> does not exist.
>
Temporary relations can't be dropped in another session. However, the
temp sequence will gone away when you close the connection that created it.

If you want to run your script many times in the same session, make sure
you include a DROP SEQUENCE at the end of the script.


--
   Euler Taveira                   Timbira - http://www.timbira.com.br/
   PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Dean Rasheed
Дата:
Сообщение: Re: BUG #13988: "plan should not reference subplan's variable" whilst using row level security
Следующее
От: eyal@impactsoft.co.il
Дата:
Сообщение: BUG #13995: Inconsistent exucution plan while using enable_nestloop