Re: DB::nextId() produces undesirable/unexpected results
| From: | Brian Abent | Date: | Fri, 25 Jan 2002 13:48:23 +0000 |
| Subject: | Re: DB::nextId() produces undesirable/unexpected results | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-4165@lists.php.net to get a copy of this message | ||
> On Thu, 2002-01-24 at 19:12, Brian Abent wrote:
> > Hello,
> >
> > I am using pgsql. When I call nextid() with the name of a sequence as
the
> > first parameter, and false as the second parameter, an error occurs. I
> > checked the source in DB/pgsql.php and found that nextId() appends
'_seq' to
> > $seq_name without my permission.
> >
> > At first I thought this was a bug, because there is no mention of
renaming
> > $seq_name in the comments above nextId() : * @param string $seq_name the
> > name of the sequence
> >
> > However, I checked oci8.php and found the same behavior so it must be
> > intentional. This seems a bit presumptuous on the part of pear db. I
> > explicitly passed a valid sequence name to a method that should
(according
> > to its comments) accept a valid sequence name. I suggest fixing(?) the
> > behavior of nextId() (although many people probably rely on this
> > functionality by now) or creating a new method that will be compatible
with
> > existing schemas. I would be happy to contribute to whatever solution
the
> > pear db team thinks is the best.
>
> I understand your problem, but we can't change the defaults here without
> breaking existing code. We could let people set a format string used
> for sequence table names, defaulting to "%s_seq", while you would set it
> to just "%s". How does that sound?
>
> - Stig
That would work for me.
Brian Abent