General Bug Report: pg_attribute a.attlen does not return correct values

From: Unprivileged user <nobody>
To: pgsql-bugs(at)postgresql(dot)org
Subject: General Bug Report: pg_attribute a.attlen does not return correct values
Date: 1999-01-11 04:49:22
Message-ID: 199901110449.XAA26628@hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


============================================================================
POSTGRESQL BUG REPORT TEMPLATE
============================================================================

Your name : Dinh Le
Your email address : dinh(at)flic(dot)net

Category : runtime: back-end
Severity : non-critical

Summary: pg_attribute a.attlen does not return correct values

System Configuration
--------------------
Operating System : Linux 2.0.36

PostgreSQL version : 6.4.2

Compiler used : gcc 2.7.2

Hardware:
---------

Versions of other tools:
------------------------
gnu make

--------------------------------------------------------------------------

Problem Description:
--------------------
Execute the following SQL command

SELECT a.attnum, a.attname, t.typname, a.attlen,
a.atttypmod, a.attnotnull, a.atthasdef
FROM pg_class c, pg_attribute a, pg_type t
WHERE c.relname = 'a table'
and a.attnum > 0
and a.attrelid = c.oid
and a.atttypid = t.oid
ORDER BY attnum;

used to return the correct value for a.attlen. The
current Postgres 6.4.2 for Linux always return -1.

--------------------------------------------------------------------------

Test Case:
----------
Run psql and execute the SQL command

SELECT a.attnum, a.attname, t.typname, a.attlen,
a.atttypmod, a.attnotnull, a.atthasdef
FROM pg_class c, pg_attribute a, pg_type t
WHERE c.relname = 'table'
and a.attnum > 0
and a.attrelid = c.oid
and a.atttypid = t.oid
ORDER BY attnum;

where 'table' is an existing table.

--------------------------------------------------------------------------

Solution:
---------

--------------------------------------------------------------------------

Browse pgsql-bugs by date

  From Date Subject
Next Message Andriy I Pilipenko 1999-01-11 09:51:34 Bug in parser
Previous Message Merle 1999-01-07 22:50:37 PERFECT FIESTA BOWL RESORT