Partition Help

Поиск
Список
Период
Сортировка
От akshunj
Тема Partition Help
Дата
Msg-id 1430319913134-5847235.post@n5.nabble.com
обсуждение исходный текст
Ответы Re: Partition Help  (Melvin Davidson <melvin6925@gmail.com>)
Re: Partition Help  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Список pgsql-general
Hi,

I am trying to setup partitions and as a test, I was able to follow the
example in the Postgres docs using the date as a condition.

Now I am trying to partition on a column with the data type character
varying. I want to partition based on an invoice ID consisting on letters
and numbers like I-10, I-11. I create my function:

IF ('invoice' <= 'I-10000') THEN INSERT INTO myschema.mywork VALUES (NEW.*)
ELSE IF ('invoice' >= 'I-10001' AND <= 'I-20000') THEN INSERT INTO
myschema.mywork VALUES (NEW.*)

ELSE RAISE EXCEPTION...

Is it possible to perform this type of operation with a mix of letters and
numbers? So far any attempts to insert based on these conditions raises the
exception.

Thanks.



--
View this message in context: http://postgresql.nabble.com/Partition-Help-tp5847235.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


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

Предыдущее
От: Ramesh T
Дата:
Сообщение:
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: New column modifier?