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

2006-05-22 Thread Jim C. Nasby
On Sat, May 20, 2006 at 11:46:25AM +0200, Tomi NA wrote: > On 5/20/06, Martijn van Oosterhout 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.

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

2006-05-20 Thread Tomi NA
On 5/20/06, Martijn van Oosterhout 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. t.n.a. ---(end of

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

2006-05-20 Thread Martijn van Oosterhout
On Sat, May 20, 2006 at 09:52:29AM +0200, Tomi NA wrote: > I need to generate a couple of dozen statements reseting my sequences > so that they're next values are greater than the biggest existing ids. > The problem is, I can't even form a statement to update one sequence. > This is what I tried: