Re: Disallow unique index on system columns

Поиск
Список
Период
Сортировка
От Eric Ridge
Тема Re: Disallow unique index on system columns
Дата
Msg-id CANcm6wb=h_9KiNLwM-=8MTC8fTSdwoCH0=VNNMKafwn=8etrPg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Disallow unique index on system columns  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Disallow unique index on system columns  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Sat, Apr 16, 2016 at 12:14 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:

Pushed.  I moved the check into DefineIndex, as that's where user-facing
complaints about indexes generally ought to be.

If you're planning on back-patching this, please don't.  :)  It'll literally ruin my life.

I've got an extension that's actually a custom Access Method, and for reasons that are probably too boring to go into here, it requires that the first column in the index be a function that takes the ctid.  Ie, something akin to:

   CREATE INDEX idx ON table (my_func('table', ctid), other_func(table));

The AM implementation itself doesn't actually use the result of my_func(), but that construct is necessary so I can detect certain queries that look like:
    SELECT FROM table WHERE my_func('table', ctid) ==> 'index condition'

I don't mind that you're changing this for 9.6... 9.6 is going to change so much other stuff around custom AMs that I'll deal with it when the time comes, but back-patching this into 9.3/4/5 would make life very difficult.

Thanks for listening!

eric

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: PGCTLTIMEOUT in pg_regress, or skink versus the clock
Следующее
От: Ants Aasma
Дата:
Сообщение: Re: Re: [COMMITTERS] pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold <