Обсуждение: bpchar_pattern_ops not shown in index command

Поиск
Список
Период
Сортировка

bpchar_pattern_ops not shown in index command

От
"Andrus"
Дата:
To reproduce, run:

create table foo ( bar char(20));
CREATE UNIQUE INDEX bar_pattern_idx ON foo(LOWER(bar) bpchar_pattern_ops);


Observed in pgadmin:

CREATE UNIQUE INDEX bar_pattern_idx ON foo USING btree (lower(bar::text));

Expected:

bpchar_pattern_ops  clause must also be present

Platform:

PgAdmin 1.4.0 on Windows XP with Postgres 8.1

Andrus. 




Re: bpchar_pattern_ops not shown in index command

От
"Dave Page"
Дата:

> -----Original Message-----
> From: pgadmin-support-owner@postgresql.org
> [mailto:pgadmin-support-owner@postgresql.org] On Behalf Of Andrus
> Sent: 06 June 2006 09:17
> To: pgadmin-support@postgresql.org
> Subject: [pgadmin-support] bpchar_pattern_ops not shown in
> index command
>
> To reproduce, run:
>
> create table foo ( bar char(20));
> CREATE UNIQUE INDEX bar_pattern_idx ON foo(LOWER(bar)
> bpchar_pattern_ops);
>
>
> Observed in pgadmin:
>
> CREATE UNIQUE INDEX bar_pattern_idx
>   ON foo
>   USING btree
>   (lower(bar::text));

This appears to be an issue with the PostgreSQL function pg_get_indexdef
- I've raised the issue on -hackers.

Regards, Dave


Re: bpchar_pattern_ops not shown in index command

От
"Dave Page"
Дата:

> -----Original Message-----
> From: pgadmin-support-owner@postgresql.org
> [mailto:pgadmin-support-owner@postgresql.org] On Behalf Of Dave Page
> Sent: 12 June 2006 12:13
> To: Andrus; pgadmin-support@postgresql.org
> Subject: Re: [pgadmin-support] bpchar_pattern_ops not shown
> in index command
>
>
>
> > -----Original Message-----
> > From: pgadmin-support-owner@postgresql.org
> > [mailto:pgadmin-support-owner@postgresql.org] On Behalf Of Andrus
> > Sent: 06 June 2006 09:17
> > To: pgadmin-support@postgresql.org
> > Subject: [pgadmin-support] bpchar_pattern_ops not shown in
> > index command
> >
> > To reproduce, run:
> >
> > create table foo ( bar char(20));
> > CREATE UNIQUE INDEX bar_pattern_idx ON foo(LOWER(bar)
> > bpchar_pattern_ops);
> >
> >
> > Observed in pgadmin:
> >
> > CREATE UNIQUE INDEX bar_pattern_idx
> >   ON foo
> >   USING btree
> >   (lower(bar::text));
>
> This appears to be an issue with the PostgreSQL function
> pg_get_indexdef
> - I've raised the issue on -hackers.

Apparently it was intended to work that way. SQL based fix committed to
trunk.

Thanks, Dave.


text_pattern_ops not shown in index command

От
"Andrus"
Дата:
To reproduce:

create table foo ( bar char(20));
CREATE UNIQUE INDEX bar_pattern_idx ON foo(LOWER(bar) text_pattern_ops);

Observed in pgAdmin 1.6 post beta-1 table definition pane:

CREATE UNIQUE INDEX bar_pattern_idx ON foo USING btree (lower(bar::text));

Expected:

text_pattern_ops must be present


Remarks:

1. pg_get_indexdef() returns text_pattern_ops . I'm wondering why pgAdmin 
does not use this.

2. Similar issue with bpchar_pattern_ops is fixed, thanks.

Andrus.

"PostgreSQL 8.2beta1 on i686-pc-mingw32, compiled by GCC gcc.exe (GCC) 3.4.2 
(mingw-special)" 




Re: text_pattern_ops not shown in index command

От
Dave Page
Дата:
Andrus wrote:
> To reproduce:
> 
> create table foo ( bar char(20));
> CREATE UNIQUE INDEX bar_pattern_idx ON foo(LOWER(bar) text_pattern_ops);
> 
> Observed in pgAdmin 1.6 post beta-1 table definition pane:
> 
> CREATE UNIQUE INDEX bar_pattern_idx
>   ON foo
>   USING btree
>   (lower(bar::text));
> 
> Expected:
> 
> text_pattern_ops must be present

Thanks, fixed in SVN.

Regards, Dave