pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bishop <james.bishop@jrc.it>
To: pgsql-interfaces@postgresql.org
Subject: Pg (Perl interface) NOTICE: Unrecognized variable client_encoding
Date: Thu, 23 Sep 1999 19:13:48 +0200
Message-ID: <37EA5FCC.7B250A14@jrc.it> (raw)

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



Message-ID: <37EA5FCC.7B250A14@jrc.it>
Permalink:  ../37EA5FCC.7B250A14@jrc.it/
Also on:    postgresql.org/message-id/37EA5FCC.7B250A14@jrc.it

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: james.bishop@jrc.it
  Subject: Re: Pg (Perl interface) NOTICE: Unrecognized variable client_encoding
  In-Reply-To: <37EA5FCC.7B250A14@jrc.it>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox