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] type cast

2010-08-10 Thread Tom Lane
Imre Horvath writes: > I've got a plpython function, with a character varying param. > I can call it from sql. > But when i try to call it with psycopg2.callproc('testfunc', ['test']), > i've got the error: > function testfunc(unknown) does not exist > HINT: No function matches the given name and

Re: [SQL] type cast

2010-08-10 Thread Peter Eisentraut
On tis, 2010-08-10 at 18:38 +0200, Imre Horvath wrote: > Hi! > > I don't know if it's the right place or the psycopg2 list: > > I've got a plpython function, with a character varying param. > I can call it from sql. > But when i try to call it with psycopg2.callproc('testfunc', ['test']), > i've

[SQL] type cast

2010-08-10 Thread Imre Horvath
Hi! I don't know if it's the right place or the psycopg2 list: I've got a plpython function, with a character varying param. I can call it from sql. But when i try to call it with psycopg2.callproc('testfunc', ['test']), i've got the error: function testfunc(unknown) does not exist HINT: No func