Subject: PGBROWSE patch

From: Jim Davidson <[email-masked]>
Date: Tue, 05 Jul 1994 17:38:37 -0700

Hello,

The patch:

	ftp://crseo.ucsb.edu/pub/pgbrowse/pgbrowse-v3.1b.patch2

fixes a problem reported by Lukas Rosenthaler <[email-masked]>:

 If I want to append to a class using the query dialog box, the attributes in
 the presented form do not correspond to the attributes used in the append
 command. An example:
 
 Let's assume a class of 3 attributes, name (char16), last_name (char16) and
 phone (int). The form does present the following (ascii representation ;-) )
 
 	phone: 		______________
         last_name: 	______________
 	name: 		_____________
 	oid: 		_______________
 
 after filling in:
 
 	phone: 		1234
 	last_name: 	Rosenthaler
 	name: 		lukas
 
 but the append command looks like this:
 
 append adress (
 	name="1234"::char16,
 	vorname="Rosenthaler"::char16,
 	telefon="lukas"::char16
 )
 
 It looks like the order has been reversed.

It turned out to be a one-line fix, the patch is included below.
Thanks to Lukas for pointing this out!

Cheers, -Jim

*** lib/browse.tcl.orig	Tue Jul 05 17:17:17 1994
--- lib/browse.tcl	Tue Jul 05 17:21:13 1994
***************
*** 1,7 ****
  #
  # browse.tcl - procedures for the top level window of PGBrowse
  #
! # $Header: /home/jimbo/pgbrowse/lib/RCS/browse.tcl,v 1.1 1994/07/06 00:11:22 jimbo Exp $
  #
  
  # ---------------------------------------------------------------------------
--- 1,7 ----
  #
  # browse.tcl - procedures for the top level window of PGBrowse
  #
! # $Header: /home/jimbo/pgbrowse/lib/RCS/browse.tcl,v 1.2 1994/07/06 00:12:38 jimbo Exp $
  #
  
  # ---------------------------------------------------------------------------
***************
*** 568,573 ****
--- 568,574 ----
      and   pg_attribute.atttypid = pg_type.oid
      and   pg_attribute.attnum   > 0
      and   pg_class.relname      = \"$class\"
+     sort by attnum
  "
      set msg "Opening $class..."
      if ![PQ exec $cmd $msg] {

==============================================================================
   To add/remove yourself to/from the POSTGRES mailing list: send mail with 
   the subject line ADD or DEL to "[email-masked]"

   If this fails, send mail to "[email-masked]" and
   a human will deal with it.  DO NOT post to the "postgres" mailing list.
==============================================================================