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

Re: attribute names & typecast/psql default port

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: attribute names & typecast/psql default port
Date: 2001-09-09 03:08:46
Message-ID: 200109090308.f8938kl00781@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-patches
First part only.

Your patch has been added to the PostgreSQL unapplied patches list at:

	http://candle.pha.pa.us/cgi-bin/pgpatches

I will try to apply it within the next 48 hours.

> Hi all,
> 
> I found a few bugs this afternoon - Patch attached. Patch was generated
> from current source and tested with the regression tests.
> 
> ...
> 
> ============== shutting down postmaster               ==============
> 
> ======================
>  All 77 tests passed.
> ======================
> 
> ...
> 
> ----
> 
> Bug #1: attribute name when column is type cast:
> 
> Given the following table:
> 
> test=# \d f
>           Table "f"
>  Column |  Type   | Modifiers
> --------+---------+-----------
>  i      | integer |
>  test   | text    |
> 
> If I do the following:
> 
> test=# insert into f values(1,'test');
> INSERT 139549 1
> test=# select i::int8,test from f;
>  ?column? | test
> ----------+------
>         1 | test
> (1 row)
> 
> It doesn't make much sense that the first column should be called
> '?column?'.
> 
> The patch results in the output appearing like this:
> 
> test=# select i::int8,test from f;
>  i | test
> ---+------
>  1 | test
> (1 row)
> 
> ----------
> 
> Bug #2
> 
> Found this while testing the first patch. As it happens I only have one
> box handy and it was running PG already. I changed the default port to
> 9999. When I executed bin/psql (the freshly built psql) it connected to my
> production postmaster on port 5432.
> 
> The patch sets the configured port to that defined in pg_config.h.
> 
> Gavin

Content-Description: 

[ Attachment, skipping... ]

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

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

In response to

pgsql-patches by date

Next:From: Gavin SherryDate: 2001-09-09 03:09:09
Subject: Re: attribute names & typecast/psql default port
Previous:From: Bruce MomjianDate: 2001-09-09 01:15:54
Subject: Re: [HACKERS] JDBC pg_description update needed for CVS tip

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