Re: [HACKERS] Have psql show current sequnce values - (Resubmission)

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org, Dhanaraj M <Dhanaraj(dot)M(at)Sun(dot)COM>, pgsql-patches(at)postgresql(dot)org
Subject: Re: [HACKERS] Have psql show current sequnce values - (Resubmission)
Date: 2007-02-13 16:26:45
Message-ID: 200702131626.l1DGQjP08332@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches


Based on this patch review, I am removing the patch from the patch
queue and requiring a resubmission.

---------------------------------------------------------------------------

Tom Lane wrote:
> Dhanaraj M <Dhanaraj(dot)M(at)Sun(dot)COM> writes:
> > Sorry for resubmitting this patch.
> > Just now I found a problem.
> > Instead of assigning initial sequence value to 1,
> > I assign LLONG_MAX to avoid the buffer overflow problem.
> > Please find the current version here.
>
> This patch is a mess. In the first place, it's completely unkosher for
> an application to scribble on a PGresult's contents, even if you do take
> steps like the above to try to make sure there's enough space. But said
> step does not work anyway -- LLONG_MAX might not exist on the client, or
> might exist but be smaller than the server's value.
>
> Another problem with it is it's not schema-aware and not proof against
> quoting requirements for the sequence name (try it with a mixed-case
> sequence name for instance). It also ought to pay some attention to
> the possibility that the SELECT for last_value fails --- quite aside
> from communication failure or such, there might be a permissions problem
> preventing the last_value from being read.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2007-02-13 16:26:57 Re: Have psql show current sequnce values - (Resubmission)
Previous Message Magnus Hagander 2007-02-13 16:25:15 Re: XML changes broke assert-enabled vcbuild

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2007-02-13 16:26:57 Re: Have psql show current sequnce values - (Resubmission)
Previous Message Magnus Hagander 2007-02-13 08:34:50 Re: New features for pgbench