Re: ALTER SEQUENCE ... RESTART WITH [variable] problem

Поиск
Список
Период
Сортировка
От Jim C. Nasby
Тема Re: ALTER SEQUENCE ... RESTART WITH [variable] problem
Дата
Msg-id 20060522221239.GB64371@pervasive.com
обсуждение исходный текст
Ответ на Re: ALTER SEQUENCE ... RESTART WITH [variable] problem  ("Tomi NA" <hefest@gmail.com>)
Список pgsql-general
On Sat, May 20, 2006 at 11:46:25AM +0200, Tomi NA wrote:
> On 5/20/06, Martijn van Oosterhout <kleptog@svana.org> wrote:
>
> >Seems you can't use a variable there. Your choices are to build a
> >string and use EXECUTE, or just do:
> >
> >SELECT setval('sequence',value);
>
> The EXECUTE string solution did the job. Thank you very much, Martijn.

As an FYI, the function version would be faster, since it can cache the
plan. Though in this case it sounds like it doesn't matter one iota.
--
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461

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

Предыдущее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: background writer process (PID 1400) exited with exit code 0 -- repeatedly && incomplete startup packet
Следующее
От: "Florian G. Pflug"
Дата:
Сообщение: Re: Let's make CPgAN!