Open mkgrgis opened 4 years ago
No problems with firebird_fdw for '/var/firebird/Пример.fdb'
or '/tmp/テスト.fdb'
. This issue really belongs to fbsql.
I can reproduce the issue.
I've modified the connection code to actually output the error message returned by Firebird:
$ ./src/fbsql -d localhost:/tmp/テスト.fdb -u sysdba -p masterkey
fbsql 0.2.0
Error connecting to 'localhost:/tmp/テスト.fdb' as 'sysdba'
Invalid connection string
- Cannot transliterate character between character sets
- Invalid or incomplete multibyte or wide character
The connection code in both fbsql
and firebird_fdw
basically does the same thing, the main difference is that in firebird_fdw
the connection string is coming from within PostgreSQL, with fbsql
it's coming from the shell environment. I can't see what difference that makes though, but obviously there's an issue somewhere.
The ISC_DATABASE='/tmp/テスト.fdb' fbsql -u sysdba -p 'masterkey';
shell command is similar to fbsql -d localhost:/tmp/テスト.fdb -u sysdba -p masterkey
by behaviour.
Either the problem is in both cases of passing arguments, or not in passing arguments.
Look like this problem is inside isc_attach_database
but there is no problem if passing db_path
form firebird_fdw
. localhost
prefix isn't critical.
@ibarwick, what is external form of the database file string from PostgreSQL FDW API? For example near server_options.database.opt.strptr = &svr_database
Debug output gdb
look like a problem between UTF-8, 1byte and wide character.
Error connecting to 'localhost:/tmp/テスト.fdb' as 'sysdba'
in fbsql
, but psql
set client_min_messages='debug3';
...
デバッグ: server option: "address"
デバッグ: server option: "database"
デバッグ: path: localhost:/tmp/テスト.fdb
デバッグ: client_encoding: "UTF8"
デバッグ: firebirdGetConnection(): DB connection OK
デバッグ: firebirdInstantiateConnection(): new firebird_fdw connection 0x564c2512fa10 for server "fb テスト"
in isql-fb
then
but in bash
Is this error of libfq lib?