Can't connect to 6.5.2 server with 7.0.2 client

Started by Forest Wilkinsonover 25 years ago7 messagesgeneral
Jump to latest
#1Forest Wilkinson
fspam@home.com

I was just about to give postgres 7.0.2 a try on my development machine,
but after installing it, I find that I can't connect to my 6.5.2
production servers. The following error message is reported by both psql
and pgaccess, upon trying to connect:

ERROR: MultiByte strings (MB) must be enabled to use this function

The connection then fails. Is there some way around this, short of
upgrading all my production servers?

Cheers,

Forest

#2Tatsuo Ishii
t-ishii@sra.co.jp
In reply to: Forest Wilkinson (#1)
Re: Can't connect to 6.5.2 server with 7.0.2 client

I was just about to give postgres 7.0.2 a try on my development machine,
but after installing it, I find that I can't connect to my 6.5.2
production servers. The following error message is reported by both psql
and pgaccess, upon trying to connect:

ERROR: MultiByte strings (MB) must be enabled to use this function

The connection then fails. Is there some way around this, short of
upgrading all my production servers?

Recompile your 7.0.2 without --enable-multibyte option.
--
Tatsuo Ishii

#3Weiping He
laser@zhengmai.com.cn
In reply to: Forest Wilkinson (#1)
Re: Psql Question

Danny wrote:

- Hello
- I had previous experience with Access and MySQL.

-Situation

- I am trying to create the equvilant of the following which is a mysql
command.

- Queston
- But I cannot figure out how to do this is postgresql

"mysql -u root -p mydb < mydb.dump"

I think:
psql -u somebody -d template1 < yourdb.dump
would work.

- I was trying to create a test database using the following commands using a
very cliche example . This command works on mySQL and should be part of the
ANSI SQL standard

mydb=# INSERT INTO Customer (Customer_ID,Customer_Name,Customer_Address,Customer_Email)
mydb-# VALUES ('1','Danny Ho','99 Second Ave, Kingswood','dannyh@customer.com'),
mydb-# ('2','Randal Handel','54 Oxford Road, Cambridge','randalh@customer.com')
mydb-# ;

you can't insert two values at the same time, you would have to use two INSERT.

Show quoted text

-and I get the following errors :

ERROR: parser: parse error at or near ","

Looking forwrd to your feedback.,

dannyh

dannyH@dix.com.au

#4Forest Wilkinson
fspam@home.com
In reply to: Tatsuo Ishii (#2)
Re: Can't connect to 6.5.2 server with 7.0.2 client

Recompile your 7.0.2 without --enable-multibyte option.

That's a static setting, then? Oh, bother. I was hoping the pg7 clients
would be smart enough to fall back as necessary, for connecting
non-multibyte servers.

#5Danny
dannyh@idx.com.au
In reply to: Forest Wilkinson (#1)
Psql Question

- Hello
- I had previous experience with Access and MySQL.

-Situation

- I am trying to create the equvilant of the following which is a mysql
command.

- Queston
- But I cannot figure out how to do this is postgresql

"mysql -u root -p mydb < mydb.dump"

- I was trying to create a test database using the following commands using a
very cliche example . This command works on mySQL and should be part of the
ANSI SQL standard

mydb=# INSERT INTO Customer (Customer_ID,Customer_Name,Customer_Address,Customer_Email)
mydb-# VALUES ('1','Danny Ho','99 Second Ave, Kingswood','dannyh@customer.com'),
mydb-# ('2','Randal Handel','54 Oxford Road, Cambridge','randalh@customer.com')
mydb-# ;

-and I get the following errors :

ERROR: parser: parse error at or near ","

Looking forwrd to your feedback.,

dannyh

dannyH@dix.com.au

#6Tom Lane
tgl@sss.pgh.pa.us
In reply to: Forest Wilkinson (#1)
Re: Can't connect to 6.5.2 server with 7.0.2 client

Forest Wilkinson <fspam@home.com> writes:

I was just about to give postgres 7.0.2 a try on my development machine,
but after installing it, I find that I can't connect to my 6.5.2
production servers. The following error message is reported by both psql
and pgaccess, upon trying to connect:

ERROR: MultiByte strings (MB) must be enabled to use this function

The connection then fails. Is there some way around this, short of
upgrading all my production servers?

Recompile your 7.0 libpq without MULTIBYTE support.

7.0 servers are less stiff-necked about this incompatibility, but that
won't help you with a 6.5 server...

regards, tom lane

#7Peter Eisentraut
peter_e@gmx.net
In reply to: Danny (#5)
Re: Psql Question

Danny writes:

mydb=# INSERT INTO Customer (Customer_ID,Customer_Name,Customer_Address,Customer_Email)
mydb-# VALUES ('1','Danny Ho','99 Second Ave, Kingswood','dannyh@customer.com'),
mydb-# ('2','Randal Handel','54 Oxford Road, Cambridge','randalh@customer.com')
mydb-# ;

-and I get the following errors :

ERROR: parser: parse error at or near ","

PostgreSQL doesn't support this syntax (yet). You need to split it into
two INSERT commands.

--
Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/