From: pgsql-sql-owner@postgresql.org [mailto:pgsql-sql-owner@postgresql.org] On Behalf Of Michael MooreSent: Tuesday, March 22, 2016 8:24 PMTo: postgres list <pgsql-sql@postgresql.org>Subject: [SQL] simple function index question
This:
CREATE INDEX TX_QSET_DIR_MAP_PRI_URI_TYP_UK
ON tx_question_set_dir_map
USING btree
((
CASE
WHEN uri_type = 201900 then
(question_set2tx_question_set ,uri_type, null)
ELSE
(question_set2tx_question_set ,uri_type, question_set_dir_map_key)
END))
TABLESPACE qsn_indx_ol;
results in
ERROR: column "" has pseudo-type record
********** Error **********
SQL state: 42P16
Hopefully it is clear what I am attempting to do here. How do I make this happen?
Try casting NULL to whatever type question_set_dirmap_key is.
Sai it is varchar, then:
……………………………………………..
(question_set2tx_question_set ,uri_type, null::varchar)
……………………………………………………………….
Regards,
Igor Neyman
pgsql-sql by date:
Соглашаюсь с условиями обработки персональных данных