Sequence Bug in Postgres 9.2.4 ?

From: Gary Kushner <gekushner(at)yahoo(dot)com>
To: "pgsql-it-generale(at)postgresql(dot)org" <pgsql-it-generale(at)postgresql(dot)org>
Subject: Sequence Bug in Postgres 9.2.4 ?
Date: 2013-09-14 01:00:14
Message-ID: 1379120414.97273.YahooMailNeo@web160706.mail.bf1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-it-generale

I'm creating a table in postgres 9.2.4 with a sequence for the primary key. The sequence that gets created has a very long name (>31 chars). I need to alter it, but can't. Can anyone think of a work around?

<code>
--I create the table like this

CREATE TABLE "userreg_userregformcompleted" (
    "regFormNumber" serial NOT NULL PRIMARY KEY,
);

---

-- Here it is and I can find it any other way with this name

\ds:

                             List of relations
 Schema |                      Name                      |   Type   | Owner
--------+------------------------------------------------+----------+-------
 public | userreg_userregformcompleted_regFormNumber_seq | sequence | als

----

-- but I can't access it. If I change the name in a gui it works.

alsdb=# alter sequence userreg_userregformcompleted_regFormNumber_seq restart with 10;

ERROR:  relation "userreg_userregformcompleted_regformnumber_seq" does not exist
</code>

Browse pgsql-it-generale by date

  From Date Subject
Next Message Gary Kushner 2013-09-14 01:25:40 Sequence Bug in Postgres 9.2.4 ?
Previous Message fluca1978 2013-09-03 08:42:51 [PGDay.IT 2013] Lista dei talk