Case sensitivity in psql/pg_dump

From: Michal Schwarz <misch(at)czechin(dot)cz>
To: "'pgsql-bugs(at)postgresql(dot)org'" <pgsql-bugs(at)postgresql(dot)org>
Subject: Case sensitivity in psql/pg_dump
Date: 2002-04-16 15:31:03
Message-ID: ECF6A65C93D5D311A22C004F4909B35D1B4247@czechin-server.brno.czechin.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Problem:
--------
pg_dump does not honour case-sensitivity in user names, which results to
failures when restoring database.

Environment:
------------
Version: PostgreSQL 7.2 on i686-pc-linux-gnu, compiled by GCC 2.95.2
System: Linux jtam.brno.czechin.cz 2.2.17-RAID #8 SMP Mon Oct 16 10:48:13
CEST 2000 i686 unknown

Exact steps to reproduce this bug:
----------------------------------
Run "psql template1"

template1=> CREATE USER "BLBEC" WITH CREATEDB;
CREATE USER
template1=> \c - "BLBEC"
You are now connected as new user BLBEC.
template1=> CREATE DATABASE blbectest;
CREATE DATABASE
template1=> \c blbectest "BLBEC"
You are now connected to database blbectest as user BLBEC.
template1=> CREATE TABLE test (a INT);
CREATE
template1=> \q

Then run "pg_dump blbectest". Result will contain command '\connect -
BLBEC', which is incorrect, because user name 'BLBEC' should be enclosed by
quotes. Psql 7.1 worked even withoud quotes and connected as user 'BLBEC',
while psql 7.2 fails with error:

FATAL 1: user "blbec" does not exist
Previous connection kept

Ie. psql 7.2 obviously EXPECTS quotes, while pg_dump and pg_dumpall DO NOT
GENERATE them.

bye,
--
Michal Schwarz

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Rod Taylor 2002-04-16 16:10:56 Foreign Key woes -- 7.2 and ~7.3
Previous Message Michal Schwarz 2002-04-16 15:18:47 replace_vars_with_subplan_refs