Pg (Perl interface) NOTICE: Unrecognized variable client_encoding

Поиск
Список
Период
Сортировка
От Bishop
Тема Pg (Perl interface) NOTICE: Unrecognized variable client_encoding
Дата
Msg-id 37EA5FCC.7B250A14@jrc.it
обсуждение исходный текст
Список pgsql-interfaces
Good evening,

I'm trying to store data from a meteo station into a PostgreSQL data
base. Measurement data are transferred over an IEEE-488 bus by a Perl
script run from cron. All this worked on a RedHat 5.2 Linux system (data
acquisition and PostgreSQL 6.4.2 database on the same machine).

The Perl script uses the Pg module to perform a copy operation into the
table.

Now I've compiled PostgreSQL 6.5.2 on a RedHat 6.0 system. I tried
moving the database to this new system, but when I try to run the Perl
script, I get the above warning. psql to the new host works without a
hitch from both the meteo station host and my own workstation (both
RedHat Linux 5.2).

What is this "client_encoding" variable?

PostgreSQL is running on the RedHat Linux 6.0 host, named "champ",
started by the following command line:

su -l postgres -c '/usr/local/pgsql/bin/postmaster -i -S -D/meteo
>>/meteo/pglog 2>&1'

A test script, run on the meteo station host (RedHat Linux 5.2) with
userid "robot" is:

#!/usr/bin/perl -w

use Pg;
use strict;

my ($conn, $rc, $dbmain, $dbuser);

$dbmain = 'meteo';

my $Option_ref = Pg::conndefaults();
my ($key, $val);
( $$Option_ref{port} ne "" && $$Option_ref{dbname} ne "" &&
$$Option_ref{user} ne "" )   and print "Pg::conndefaults ........ ok\n"   or  die   "Pg::conndefaults ........ not ok:
",$conn->errorMessage;
 
$conn = Pg::connectdb("host=champ dbname=$dbmain");
( PGRES_CONNECTION_OK eq $conn->status )   and print "Pg::connectdb ........... ok\n"   or  die   "Pg::connectdb
...........not ok: ", $conn->errorMessage;
 


This script gives the following output:

Pg::conndefaults ........ ok
NOTICE:  Unrecognized variable client_encoding
Pg::connectdb ........... ok


If I run the same script from my own workstation (editing the host name
appropriately in the connectdb call), and connect to the PostgreSQL
6.4.2 database server on the meteo tower host I get the following
output:

Pg::conndefaults ........ ok
Pg::connectdb ........... ok

Is this a Pg problem, a Perl problem, a PostgreSQL 6.5.2 problem, or
what?

All the best,
James Bishop


В списке pgsql-interfaces по дате отправления:

Предыдущее
От: Jens Glaser
Дата:
Сообщение: Re: [INTERFACES] java.sql.Types problem
Следующее
От: Can BICAN
Дата:
Сообщение: writing functions with C