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: http://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/back

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 var

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 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 t

[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 ques

Re: [SQL] array dimensions, pg_catalog.pg_attribute and the \d command

2012-02-06 Thread Achilleas Mantzios
On Παρ 03 Φεβ 2012 22:21:49 Dmitriy Igrishin wrote: > Hey Achilleas, > > 2012/2/3 Achilleas Mantzios > > > Hello, > > just a question regarding multidimensional arrays. > > When i create an array, its number of dimensions is recorded in > > pg_catalog.pg_attribute (attndims), but they are not en