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

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 (view raw or flat)
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:
---------


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


pgsql-bugs by date

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

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