Re: PostgreSQL No Longer Handles Mixed Case Sequences

Поиск
Список
Период
Сортировка
От Rod Taylor
Тема Re: PostgreSQL No Longer Handles Mixed Case Sequences
Дата
Msg-id 1037386446.14810.97.camel@jester
обсуждение исходный текст
Ответ на PostgreSQL No Longer Handles Mixed Case Sequences  (Brian Harris <brian@harris-piper.freeserve.co.uk>)
Список 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 по дате отправления:

Предыдущее
От: Rod Taylor
Дата:
Сообщение: Re: Bug in pg_dump
Следующее
От: Tom Lane
Дата:
Сообщение: Re: copy works, \copy doesn't