Possible error in psql or Postgres?

From: Dusan Misic <promisic(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Possible error in psql or Postgres?
Date: 2012-06-12 19:21:59
Message-ID: CAGdZ+ND2bN6KO4cPJRHSPVtC2vun5s+uoAUYKPXYvB2h2fgXvQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Is this normal Postgres / psql behavior?

griffindb=# \d system.user;
Table "system.user"
Column | Type | Modifiers

-----------+-----------------------+--------------------------------------------
--------
username | character varying(20) | not null
password | character varying(32) | not null
firstname | character varying(40) | not null default 'nema ime'::character
vary
ing
lastname | character varying(40) | not null default 'nema
prezime'::character
varying
Indexes:
"SystemUser_PK" PRIMARY KEY, btree (username) CLUSTER

normal query:

griffindb=# select * from system.user where username = 'root';
username | password | firstname | lastname
----------+----------------------------------+-----------+---------------
root | 1e7db545fccbf4e03abc6b71d329ab4f | Super | administrator
(1 row)

error query:

griffindb=# select * from system.user where user = 'root';
username | password | firstname | lastname
----------+----------+-----------+----------
(0 rows)

column user does not exist should throw an error!

PostgreSQL / psql version: 9.1.3 on Windows 7 64-bit

Should Postgres or psql report an error because column used in WHERE clause
does not exist?

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2012-06-12 19:32:27 Re: Possible error in psql or Postgres?
Previous Message Tom Lane 2012-06-12 19:13:26 Re: Restrict ALTER FUNCTION CALLED ON NULL INPUT (was Re: Not quite a security hole: CREATE LANGUAGE for non-superusers)