Return-Path: pg_adm@postgres.berkeley.edu
Received: by postgres.Berkeley.EDU (5.61/1.29)
	id AA12856; Mon, 26 Jul 93 17:23:25 -0700
Date: Mon, 26 Jul 93 17:23:25 -0700
From: "David J. Hughes" <bambi@Bond.edu.au>
Subject: Re: Remove attribute?
To: postgres@postgres.berkeley.edu
Sender: pg_adm@postgres.berkeley.edu
To: Patchaya Pitakpaivan <pp@cacs.usl.edu>
Cc: postgres@postgres.Berkeley.EDU
In-Reply-To: <9307262131.AA11205@postgres.Berkeley.EDU>
Message-Id: <Pine.3.07.9307271004.x286-b100000@fiddich.its.Bond.edu.au>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII



On Mon, 26 Jul 1993, Patchaya Pitakpaivan wrote:

> Can we adjust the format of the table so that the columns width is wider and 
> the table is in more "good looking" form?

Another option is to fire up the Postgres capable Perl and use the
formated output capabalities of Perl for this sort of task.  I use PGPerl
as a report writer on a regular basis.  The PGPerl extensions should be in
the contrib area of your postgres source tree.



> 3. In my program, I try to display the instances of the class in X window. Are
> there any commands that I can retrieve all instances of the class with its 
> attribute names (as heading) without having to pass all instances through portal.
> I try to use copy command and then use PQgetline. But the result is not in good 
> format and there is no heading for those instances.


If I read this correctly, you want to gather the attribute names etc. for
display purposes.  If that's the case, some code I wrote could help you. 
It's a utility I wrote a while back when I started using Postgres as a
backend for a network management system I'm developing.  It allows you to
brows through the structure of a database showing attributes and types
etc. in a textual format.  You could cut and past some of the code to do
this under X (my NMS uses code from this utiulity under Motif). 

It's called relshow and is available from :-

	Hostname	kirk.Bond.edu.au
	IP Addr		131.244.1.1
	Path		/pub/Bond_Uni/relshow/relshow.tar.Z


If I didn't read your question correctly, forget I even mentioned it :-)




   ___                                  David J. Hughes    bambi@Bond.edu.au
  /   \                /  /    /        
 /  __/ __   __   ____/  /    / __            Senior Network Programmer
/    \ /  \ /  \ /   /  /    / /  \  /     Information Technology Services
\____/ \__//   / \__/   \___/ /   / /   Qld. 4229  AUSTRALIA  (+61 75 951450)




