pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Cannot CREATE INDEX that contains a function
2+ messages / 2 participants
[nested] [flat]

* Cannot CREATE INDEX that contains a function
@ 2001-01-24 21:29  Roberto Bertolusso <rb@desinet-sa.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Roberto Bertolusso @ 2001-01-24 21:29 UTC (permalink / raw)
  To: pgsql-novice@postgresql.org

I am testing Postgresql-7.0.3

Please tell me what I am doing bad.

In psql...
testdb=# CREATE TABLE test (username varchar(50));
CREATE
testdb=# CREATE UNIQUE INDEX test_index ON test (lower(username));
ERROR: DefineIndex: function 'lower(varchar)' does not exist

The same happens using upper, initcap,...
Roberto Bertolusso




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Cannot CREATE INDEX that contains a function
@ 2001-01-26 03:47  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Roberto Bertolusso <rb@desinet-sa.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2001-01-26 03:47 UTC (permalink / raw)
  To: Roberto Bertolusso <rb@desinet-sa.com>; +Cc: pgsql-sql

Roberto Bertolusso <rb@desinet-sa.com> writes:
> testdb=# CREATE TABLE test (username varchar(50));
> CREATE
> testdb=# CREATE UNIQUE INDEX test_index ON test (lower(username));
> ERROR: DefineIndex: function 'lower(varchar)' does not exist

Short answer in 7.0.* is to make the column be type text not varchar.
7.1 is more flexible about this ...

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2001-01-26 03:47 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-01-24 21:29 Cannot CREATE INDEX that contains a function Roberto Bertolusso <rb@desinet-sa.com>
2001-01-26 03:47 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox