Re: varchar(n) VS text
От | Paul Lambert |
---|---|
Тема | Re: varchar(n) VS text |
Дата | |
Msg-id | 46830CDF.7060507@autoledgers.com.au обсуждение исходный текст |
Ответ на | Re: varchar(n) VS text (Michael Glaesemann <grzm@seespotcode.net>) |
Ответы |
Re: varchar(n) VS text
|
Список | pgsql-general |
Michael Glaesemann wrote: > Works for me: > > test=# select version(); > version > ---------------------------------------------------------------------------------------------------------------------------------------------- > > PostgreSQL 8.2.4 on powerpc-apple-darwin8.9.0, compiled by GCC > powerpc-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build > 5367) > (1 row) > > test=# create table tester (test_varchar varchar primary key); > NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index > "tester_pkey" for table "tester" > CREATE TABLE > test=# insert into tester (test_varchar) values ('abc''test'); > INSERT 0 1 > test=# select * from tester; > test_varchar > -------------- > abc'test > (1 row) > > Michael Glaesemann > grzm seespotcode net Looks like my bad - I created the table initially through pgAdminIII and it appears I selected the wrong character varying from the dropdown list. CREATE TABLE tester ( test_varchar character varying[], test_text text ) If I change it to character varying(20) it works fine. Apologies for that. Thanks for the other info though. -- Paul Lambert Database Administrator AutoLedgers
В списке pgsql-general по дате отправления: