Re: [HACKERS] version functions (was NT port of PGSQL - success) - Mailing list pgsql-hackers

From jwieck@debis.com (Jan Wieck)
Subject Re: [HACKERS] version functions (was NT port of PGSQL - success)
Date
Msg-id m0zRZQi-000EBPC@orion.SAPserv.Hamburg.dsh.de
Whole thread Raw
In response to Re: [HACKERS] version functions (was NT port of PGSQL - success)  ("Justin Hickey" <jhickey@impact1.hpcc.nectec.or.th>)
Responses Re: [HACKERS] version functions (was NT port of PGSQL - success)  (Bruce Momjian <maillist@candle.pha.pa.us>)
List pgsql-hackers
Jazzman wrote:
>
> Hello Bruce
>
> On Oct 8,  5:40pm, Bruce Momjian wrote:
> > I have removed the data/base/*/pg_version file because it was never
> > used.  We had removed the 'version' functions long ago, but
>                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> Does this mean that the following from the FAQ is wrong?
>
>    3.25) How do I tell what PostgreSQL version I am running?
>
>    From psql, type select version();
>
> If so then this question should probably be changed to point users to the
> PG_VERSION file.

    No, it is still correct. The version function is there and it
    returns the compiled in string from version.h.

    But take a look at version.c please. I think  it  should  use
    memcpy()  or  strncpy()  instead of strcpy(). As it is now it
    writes the null byte after the palloc'ed area.


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#======================================== jwieck@debis.com (Jan Wieck) #

pgsql-hackers by date:

Previous
From: jwieck@debis.com (Jan Wieck)
Date:
Subject: PL patches (one more)
Next
From: Horak Daniel
Date:
Subject: RE: [HACKERS] NT port of PGSQL - success