Re: create type- similar char
От | Pavel Stehule |
---|---|
Тема | Re: create type- similar char |
Дата | |
Msg-id | CAFj8pRC=AfJouOzV8gVO4rzkVZQYtPKjwZjWWxc_2PkRSUDL9A@mail.gmail.com обсуждение исходный текст |
Ответ на | create type- similar char (Mohsen SM <mohsensoodkhah@gmail.com>) |
Список | pgsql-hackers |
Hello
I don't know where is a problem, but I can put a two advices[pavel@localhost ~]$ psql postgres
psql (9.4devel)
Type "help" for help.
postgres=# \set VERBOSITY verbose
postgres=# SELECT 10/0;
ERROR: 22012: division by zero
LOCATION: int4div, int.c:719
postgres=#
Regards
Pavel
Pavel
2014-03-16 14:41 GMT+01:00 Mohsen SM <mohsensoodkhah@gmail.com>:
how can I correct this problem?but for my NEWTYPE don't call the newtype() function.I check for char type the bpchar() function. when I work with char type and want to insert one word longest one character so, bpchar() called.how I can do it?but my NEWTYPE don't get this error and work similar to varchar.its error is :insert into tbl values('dd');then when I write this query, so it get an error for it's length:CREATE TABLE tbl (col1 NEWTYPE);but I want to my type behavior similar to char and when I type this query:I create one new type with CREATE TYPE command.for my type its INTERNALLENGTH is VARIABLE .
ERROR: value too long for type character(1)
В списке pgsql-hackers по дате отправления: