From: Lee Harr <missive@frontiernet.net>
To: pgsql-general@postgresql.org
Subject: Re: Bug with sequence
Date: Tue, 19 Nov 2002 01:22:24 +0000 (UTC)
Message-ID: <arc3of$1c2a$1@news.hub.org> (raw)
References: <92c0776e.0211180745.49911131@posting.google.com>
In article <92c0776e.0211180745.49911131@posting.google.com>,
Thomas Aichinger wrote:
> Hi,
>
> I recently installed pg 7.2.3 on my linux box and discovered that
> there are some problems with datatype serial and sequence.
>
> 1.) If you create a table with a datatype serial, the corrsponding
> sequence will be created, but if you drop the table the sequence is
> not dropped.
>
I am pretty sure this has been fixed in version 7.3 (due to be
release real soon now.)
> 2.) If you create a sequence and grant it to public one cant use
> currval() until one used setval() or nextval().
> "ERROR: midnr.currval is not yet defined in this session"
>
This is actually the way sequences work (ie, it's a feature, not
a bug, heh heh)
currval() gives you the current value of the sequence
*as seen in this session* ... so until you do a setval()
or a nextval() there is no value seen by this session.
> 3.) Sometimes one gets 'not enogh privileges' error when using
> nexval()
>
nextval()? hmm. well. If the user does not have privelege to
update the sequence, then the call will fail.
>
> Am I the first one who discovered that?
>
Nah, and probably not the first one to avoid the FAQ either.
heh heh.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: missive@frontiernet.net, pgsql-general@postgresql.org
Subject: Re: Bug with sequence
In-Reply-To: <arc3of$1c2a$1@news.hub.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox