Hi everyone,
Consider the following statements:
CREATE TABLE t0(c0 BIT VARYING(1));
CREATE INDEX i0 ON t0(c0 bit_ops);
ALTER TABLE t0 ALTER c0 TYPE TEXT; -- ERROR: operator class "bit_ops"
does not accept data type text
Altering the column type fails, which is somewhat unexpected, since it
does not seem to cause problems for other opclasses. For example, the
following executes without errors:
CREATE TABLE t0(c0 TEXT);
CREATE INDEX i0 ON t0(c0 text_ops);
ALTER TABLE t0 ALTER c0 TYPE BIT VARYING(1) USING c0::bit varying(1);
Is this a bug or expected? I can reproduce this on a recent trunk
version (b3c265d).
Best,
Manuel