Array or not Array?

Поиск
Список
Период
Сортировка
От Atif Jung
Тема Array or not Array?
Дата
Msg-id d1c6b9c51003030248s6e7d77dagbdb8cf81d4ebae51@mail.gmail.com
обсуждение исходный текст
Ответы Re: Array or not Array?  (Thom Brown <thombrown@gmail.com>)
Re: Array or not Array?  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
Список pgsql-novice
If I have a table as follows:
 
CREATE TABLE test1 (a char(5));
 
how would I test that the 2nd character of column a is NOT the letter 'b' for example.
 
In Informix I would say:
 
SELECT count(*) FROM test1 where a[2] <> 'b';
 
In POSTGRES I get an error saying "ERROR:  cannot subscript type character because it is not an array". I understand why I'm getting the error,  but I'm not sure how I do what I want to do?
 
Thanks to all in advance.

Atif

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Using EXIT and labels to exit blocks of statements
Следующее
От: Thom Brown
Дата:
Сообщение: Re: Array or not Array?