Re: PostgreSQL No Longer Handles Mixed Case Sequences - Mailing list pgsql-bugs

From Rod Taylor
Subject Re: PostgreSQL No Longer Handles Mixed Case Sequences
Date
Msg-id 1037386446.14810.97.camel@jester
Whole thread Raw
In response to PostgreSQL No Longer Handles Mixed Case Sequences  (Brian Harris <brian@harris-piper.freeserve.co.uk>)
List pgsql-bugs
On Wed, 2002-11-13 at 07:51, Brian Harris wrote:
> Hello,
> I have just updated to PostgreSQL 7.2.2.  I am utilising tables with
> mixed case table and field names.  I can now no longer insert data into
> these tables as shown by the following psql interchange:
>
> sharetrack=> \d "T_Joint"
>                                   Table "T_Joint"
>
>  Column  |         Type          |                    Modifiers
> ---------+-----------------------+--------------------------------------------------
>  id      | integer               | not null default nextval('T_Joint_id_seq'::text)

>       Name       |   Type   | Owner
> -----------------+----------+-------
>  T_Joint_id_seq  | sequence | brian

> Please can you advise if there is a fix available or any circumvention
> apart from redefining all affected tables.

You need to either:

ALTER TABLE RENAME "T_Tester_id_seq" TO t_tester_id_seq;

Or

ALTER TABLE "T_Joint"
   ALTER COLUMN id
   SET DEFAULT nextval('"T_Tester_id_seq"'::text);


The first converts the case of the sequence name to lower, the second
has nextval use the uppercase version.

--
Rod Taylor <rbt@rbt.ca>

pgsql-bugs by date:

Previous
From: Rod Taylor
Date:
Subject: Re: Bug in pg_dump
Next
From: Tom Lane
Date:
Subject: Re: copy works, \copy doesn't