Re: BUG #14099: Altering temporary sequence in session has no effect

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #14099: Altering temporary sequence in session has no effect
Дата
Msg-id 495.1461001375@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #14099: Altering temporary sequence in session has no effect  (imraan@techie.com)
Список pgsql-bugs
imraan@techie.com writes:
> Altering a temporary sequence using ALTER SEQUENCE within a session has no
> effect.

It would if you were using the right ALTER SEQUENCE subcommand.
Per the manual:

  The optional clause START WITH start changes the recorded start value of
  the sequence. This has no effect on the current sequence value; it
  simply sets the value that future ALTER SEQUENCE RESTART commands will
  use.

  The optional clause RESTART [ WITH restart ] changes the current value
  of the sequence. This is equivalent to calling the setval function with
  is_called = false: the specified value will be returned by the next call
  of nextval. Writing RESTART with no restart value is equivalent to
  supplying the start value that was recorded by CREATE SEQUENCE or last
  set by ALTER SEQUENCE START WITH.

> The ALTER SEQUENCE works on 9.1 and 9.3.

A quick test suggests that this works the same at least as far back as
9.1.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #14098: misleading message "out of shared memory" when lock table space exhausted
Следующее
От: soufiane.boussali@efet.ac.ma
Дата:
Сообщение: BUG #14090: Some installations of Postgres 8 and 9 are configured to allow loading external scripting languages.