Skip site navigation (1) Skip section navigation (2)

Pg (Perl interface) NOTICE: Unrecognized variable client_encoding

From: Bishop <james(dot)bishop(at)jrc(dot)it>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: Pg (Perl interface) NOTICE: Unrecognized variable client_encoding
Date: 1999-09-23 17:13:48
Message-ID: (view raw or flat)
Lists: 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

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

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

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

All the best,
James Bishop

pgsql-interfaces by date

Next:From: Can BICANDate: 1999-09-23 22:24:02
Subject: writing functions with C
Previous:From: AndyDate: 1999-09-23 13:00:37
Subject: unsubscribe

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group