Re: attribute names & typecast/psql default port - Mailing list pgsql-patches

From Gavin Sherry
Subject Re: attribute names & typecast/psql default port
Date
Msg-id Pine.LNX.4.21.0109091308120.6691-100000@linuxworld.com.au
Whole thread Raw
In response to Re: attribute names & typecast/psql default port  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-patches
Correct. (Unless anyone can find if it busts anything which regression
would not find?)

Thanks

Gavin

On Sat, 8 Sep 2001, Bruce Momjian wrote:

>
> So bug #1 patch should be applied, and not bug #2 part?
>
>
> > 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
>
>


pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [JDBC] [HACKERS] JDBC pg_description update needed for CVS tip
Next
From: Bruce Momjian
Date:
Subject: Re: attribute names & typecast/psql default port