comments on columns aren't displayed by \dd

Started by Nonamealmost 25 years ago7 messages
#1Noname
pgsql-bugs@postgresql.org

Stephen van Egmond (svanegmond@home.com) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
comments on columns aren't displayed by \dd

Long Description
Comments on columns appear to be broken. CREATE COMMENT ON COLUMN inserts stuff into the backend pg_* tables correctly. However \dd from the psql interactive monitor doesn't send a query to retrieve it (i.e. no join on pg_attribute).

I am working from the Debian package postgresql-client 7.0.3-2.

Sample Code
create table foo (a text);
cmment on column foo.a is 'hello!';
\dd foo.a

No file was uploaded with this report

#2Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Noname (#1)
Re: comments on columns aren't displayed by \dd

Psql manual pages says:

The command form \d+ is identical, but any comments
associated with the table columns are shown as
well.

Stephen van Egmond (svanegmond@home.com) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
comments on columns aren't displayed by \dd

Long Description
Comments on columns appear to be broken. CREATE COMMENT ON COLUMN inserts stuff into the backend pg_* tables correctly. However \dd from the psql interactive monitor doesn't send a query to retrieve it (i.e. no join on pg_attribute).

I am working from the Debian package postgresql-client 7.0.3-2.

Sample Code
create table foo (a text);
cmment on column foo.a is 'hello!';
\dd foo.a

No file was uploaded with this report

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
#3Stephen van Egmond
svanegmond@bang.dhs.org
In reply to: Bruce Momjian (#2)
Re: comments on columns aren't displayed by \dd

Bruce Momjian (pgman@candle.pha.pa.us) wrote:

Psql manual pages says:

The command form \d+ is identical, but any comments
associated with the table columns are shown as
well.

Thank you for the response, Bruce. I was working from the HTML docs
for COMMENT ON [1]http://www.postgresql.org/users-lounge/docs/7.0/postgres/sql-comment.htm where only \dd is mentioned. \d+ doesn't occur in the
\? psql help either.

-Steve
[1]: http://www.postgresql.org/users-lounge/docs/7.0/postgres/sql-comment.htm

#4Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Stephen van Egmond (#3)
Re: comments on columns aren't displayed by \dd

Bruce Momjian (pgman@candle.pha.pa.us) wrote:

Psql manual pages says:

The command form \d+ is identical, but any comments
associated with the table columns are shown as
well.

Thank you for the response, Bruce. I was working from the HTML docs
for COMMENT ON [1] where only \dd is mentioned. \d+ doesn't occur in the
\? psql help either.

-Steve
[1] http://www.postgresql.org/users-lounge/docs/7.0/postgres/sql-comment.htm

The + options to psql are sort of COMMENT additions to the backslash
commands.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
#5Justin Clift
jclift@iprimus.com.au
In reply to: Noname (#1)
libpqeasy cursor error after multiple calls

Hi all,

I'm just wondering if this is an error on my part, or a bug. I have the
same trouble with PG 7.1beta6 and PG7.1 snapshot (March 8th) on Solaris
8 INTEL, Solaris 8 SPARC and Linux Mandrake 7.2.

When using the libpqeasy library in a C function, I have the following
section of code :

// Get the sequence number for the next directory entry (PostgreSQL
commands)
doquery("BEGIN WORK");
doquery("DECLARE c_getdirid BINARY CURSOR FOR SELECT
nextval('prescan_directories_idnum_seq'::text)");
doquery("FETCH ALL IN c_getdirid");
fetch(&enumdirstruc_p->presentdirid);
doquery("CLOSE c_getdirid");
doquery("COMMIT WORK");

This is called once per entry in a filesystem (this is a filesystem
scanning utility) but after about 1000 or so calls, it errors out and
won't work again. I have to actually DROP the database and re-create it
again before the code will work again at all. Just vacumming doesn't
help, nor does just shutting down the database and starting it again
(doing both and vacuum and restarting the database doesn't help either).

The error message is :

<list of files correctly inserted so far, then>
/archive/install/kde/kdeadmin-2.1/ksysctrl/.cvsignore
NOTICE: PerformPortalFetch: portal "c_getdirid" not found
NOTICE: PerformPortalClose: portal "c_getdirid" not found
Directory query failed, trying again...New directory idnum = -2147483648
(This is my error message from the program)
query error:
failed request: insert into prescan_files(filename, dirent, ownername,
owenerid, groupname, groupid, filesize, os, os_version, package_id)
values ('/archive/install/kde/kdeadmin-2.1/add-on/.cvsignore',
2147483648, 'jclift', 100, 'staff', 10, 21, 1, '8 INTEL', 16777216)
$

I can include the database schema and complete source code if needed,
but I'm just not sure where to start debugging... is it my app or is it
PostgreSQL?

Regards and best wishes,

Justin Clift

#6Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Justin Clift (#5)
Re: libpqeasy cursor error after multiple calls

I am kind of stumped. Glad to see _someone_ is using libpgeasy. :-)

I would be glad to run tests here if you can shoot over the code.

Hi all,

I'm just wondering if this is an error on my part, or a bug. I have the
same trouble with PG 7.1beta6 and PG7.1 snapshot (March 8th) on Solaris
8 INTEL, Solaris 8 SPARC and Linux Mandrake 7.2.

When using the libpqeasy library in a C function, I have the following
section of code :

// Get the sequence number for the next directory entry (PostgreSQL
commands)
doquery("BEGIN WORK");
doquery("DECLARE c_getdirid BINARY CURSOR FOR SELECT
nextval('prescan_directories_idnum_seq'::text)");
doquery("FETCH ALL IN c_getdirid");
fetch(&enumdirstruc_p->presentdirid);
doquery("CLOSE c_getdirid");
doquery("COMMIT WORK");

This is called once per entry in a filesystem (this is a filesystem
scanning utility) but after about 1000 or so calls, it errors out and
won't work again. I have to actually DROP the database and re-create it
again before the code will work again at all. Just vacumming doesn't
help, nor does just shutting down the database and starting it again
(doing both and vacuum and restarting the database doesn't help either).

The error message is :

<list of files correctly inserted so far, then>
/archive/install/kde/kdeadmin-2.1/ksysctrl/.cvsignore
NOTICE: PerformPortalFetch: portal "c_getdirid" not found
NOTICE: PerformPortalClose: portal "c_getdirid" not found
Directory query failed, trying again...New directory idnum = -2147483648
(This is my error message from the program)
query error:
failed request: insert into prescan_files(filename, dirent, ownername,
owenerid, groupname, groupid, filesize, os, os_version, package_id)
values ('/archive/install/kde/kdeadmin-2.1/add-on/.cvsignore',
2147483648, 'jclift', 100, 'staff', 10, 21, 1, '8 INTEL', 16777216)
$

I can include the database schema and complete source code if needed,
but I'm just not sure where to start debugging... is it my app or is it
PostgreSQL?

Regards and best wishes,

Justin Clift

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
#7Christopher Kings-Lynne
chriskl@familyhealth.com.au
In reply to: Justin Clift (#5)
RE: libpqeasy cursor error after multiple calls

I don't know but it may be that you're trying to insert a number larger than
maxint?

ie: 2147483648

???

Chris

-----Original Message-----
From: pgsql-hackers-owner@postgresql.org
[mailto:pgsql-hackers-owner@postgresql.org]On Behalf Of Justin Clift
Sent: Tuesday, 20 March 2001 5:54 PM
To: pgsql-hackers@postgresql.org
Subject: [HACKERS] libpqeasy cursor error after multiple calls

Hi all,

I'm just wondering if this is an error on my part, or a bug. I have the
same trouble with PG 7.1beta6 and PG7.1 snapshot (March 8th) on Solaris
8 INTEL, Solaris 8 SPARC and Linux Mandrake 7.2.

When using the libpqeasy library in a C function, I have the following
section of code :

// Get the sequence number for the next directory entry (PostgreSQL
commands)
doquery("BEGIN WORK");
doquery("DECLARE c_getdirid BINARY CURSOR FOR SELECT
nextval('prescan_directories_idnum_seq'::text)");
doquery("FETCH ALL IN c_getdirid");
fetch(&enumdirstruc_p->presentdirid);
doquery("CLOSE c_getdirid");
doquery("COMMIT WORK");

This is called once per entry in a filesystem (this is a filesystem
scanning utility) but after about 1000 or so calls, it errors out and
won't work again. I have to actually DROP the database and re-create it
again before the code will work again at all. Just vacumming doesn't
help, nor does just shutting down the database and starting it again
(doing both and vacuum and restarting the database doesn't help either).

The error message is :

<list of files correctly inserted so far, then>
/archive/install/kde/kdeadmin-2.1/ksysctrl/.cvsignore
NOTICE: PerformPortalFetch: portal "c_getdirid" not found
NOTICE: PerformPortalClose: portal "c_getdirid" not found
Directory query failed, trying again...New directory idnum = -2147483648
(This is my error message from the program)
query error:
failed request: insert into prescan_files(filename, dirent, ownername,
owenerid, groupname, groupid, filesize, os, os_version, package_id)
values ('/archive/install/kde/kdeadmin-2.1/add-on/.cvsignore',
2147483648, 'jclift', 100, 'staff', 10, 21, 1, '8 INTEL', 16777216)
$

I can include the database schema and complete source code if needed,
but I'm just not sure where to start debugging... is it my app or is it
PostgreSQL?

Regards and best wishes,

Justin Clift

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org