reset sequence
reset sequence
От:
Ricardo Javier Aranibar León<ricardo_jal@hotmail.com>
Дата:
Hi List,
I need that somebody help me.
First, I use PostgreSQL 7.0.3 for linux.
I need reset my sequence but that it begin in 1 again when a use nextval.
And I have been search in http://archives.postgresql.org/ about reset
sequence but I obtain this information: SELECT setval('name_sequence', 1, false);
Now when I execute this command I have a message ERROR.
"ERROR: Function 'setval(unknow, int4, bool)' does not exist. Unable to
identify a function that satisfies the given argument types. You may need to
add explicit typecast".
_________________________________________________________________
MSN. Más Útil cada Día. http://www.msn.es/intmap/
Re: reset sequence
От:
Ludwig Lim <lud_nowhere_man@yahoo.com>
Дата:
--- Ricardo Javier Aranibar Le�n
wrote:
> Hi List,
>
> I need that somebody help me.
> First, I use PostgreSQL 7.0.3 for linux.
> I need reset my sequence but that it begin in 1
> again when a use nextval.
> And I have been search in
> http://archives.postgresql.org/ about reset
> sequence but I obtain this information:
> SELECT setval('name_sequence', 1, false);
try SELECT setval('name_sequence',1);
Maybe setval(,,) doesn't exist in
7.0.3.
regards,
ludwig lim
__________________________________________________
Do you Yahoo!?
Yahoo! News - Today's headlines
http://news.yahoo.com
Re: reset sequence
От:
"Michael Paesold" <mpaesold@gmx.at>
Дата:
Ludwig Lim wrote:
> --- Ricardo Javier Aranibar León
> wrote:
> > Hi List,
> >
> > I need that somebody help me.
> > First, I use PostgreSQL 7.0.3 for linux.
> > I need reset my sequence but that it begin in 1
> > again when a use nextval.
> > And I have been search in
> > http://archives.postgresql.org/ about reset
> > sequence but I obtain this information:
> > SELECT setval('name_sequence', 1, false);
>
> try SELECT setval('name_sequence',1);
That will probably set the current value to 1, which will result in a
nextval of 2, which is perhaps not what Ricardo wanted.
> Maybe setval(,,) doesn't exist in
> 7.0.3.
\df setval
in psql should output all possible parameter combinations for setval.
Regards,
Michael Paesold