Re: [SQL] Bit string help, please

2008-03-06 Thread Richard Huxton
[EMAIL PROTECTED] wrote: Thanks for the help again, Richard. I will look into upgrading to 8.3 as I think that will be the best solution. I don't think you'll regret it. There are some excellent improvements in 8.3 -- Richard Huxton Archonet Ltd -- Sent via pgsql-sql mailing list (pgsql-

Re: [SQL] Bit string help, please

2008-03-06 Thread Tena Sakai
kai [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] on behalf of [EMAIL PROTECTED] Sent: Thu 3/6/2008 10:24 AM To: [EMAIL PROTECTED] Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] Bit string help, please I tried this real quick at the psql command prompt, and unfortunately it doesn&#x

Re: [SQL] Bit string help, please

2008-03-06 Thread tyrrill_ed
: [SQL] Bit string help, please [EMAIL PROTECTED] wrote: > I tried this real quick at the psql command prompt, and unfortunately it > doesn't work: > > mydb=# select ('1' || repeat('0',7))::bit varying; > ERROR: cannot cast type text to bit varying >

Re: [SQL] Bit string help, please

2008-03-06 Thread Richard Huxton
[EMAIL PROTECTED] wrote: I tried this real quick at the psql command prompt, and unfortunately it doesn't work: mydb=# select ('1' || repeat('0',7))::bit varying; ERROR: cannot cast type text to bit varying I appreciate the try though. Any other ideas? I am using PostgreSQL 8.2.3.1. I don't

Re: [SQL] Bit string help, please

2008-03-06 Thread tyrrill_ed
x27;t know if that matters too much. Thanks, Ed -Original Message- From: Richard Huxton [mailto:[EMAIL PROTECTED] Sent: Thursday, March 06, 2008 12:14 AM To: Tyrrill, Ed Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] Bit string help, please [EMAIL PROTECTED] wrote: > > insert in

Re: [SQL] Bit string help, please

2008-03-06 Thread Richard Huxton
[EMAIL PROTECTED] wrote: insert into table1 values( DEFAULT, B'1'::bit( n ) ); Where n is one of the parameters to the PL/pgSQL function, but that doesn't work. PostgreSQL doesn't like having a variable for the bit string length. Does anyone have any ideas how I could achieve this? Try cast