[SQL] type cast about int to bit

2012-02-06 Thread zoulx1982
hi, there is a problem about type cast that i don't understand, follow is my test. postgres=# select 10::bit(3); bit - 010 (1 row) postgres=# select 10::bit varying(3); ERROR: cannot cast type integer to bit varying LINE 1: select 10::bit varying(3); ^ postgres=# my

Re: [SQL] type cast about int to bit

2012-02-06 Thread Jasen Betts
does the mailing list mangle these, or is it just GMANE? On 2012-02-06, zoulx1982 zoulx1...@163.com wrote: hi, there is a problem about type cast that i don't understand, follow is my test. postgres=# select 10::bit(3); bit - 010 (1 row) postgres=# select 10::bit varying(3); ERROR:

Re: [SQL] type cast about int to bit

2012-02-06 Thread Adrian Klaver
On Sunday, February 05, 2012 10:11:12 pm zoulx1982 wrote: hi, there is a problem about type cast that i don't understand, follow is my test. postgres=# select 10::bit(3); bit - 010 (1 row) postgres=# select 10::bit varying(3); ERROR: cannot cast type integer to bit varying LINE

Re: [SQL] type cast about int to bit

2012-02-06 Thread Adrian Klaver
On Monday, February 06, 2012 6:42:45 pm zoulx1982 wrote: you mean there is no cast function for int to varchar ? i see sure it is. That is why I said my guess:) If you want to see what is actually going on take a look at: