Re: migrate hashname function from 8.1.x to 8.4

Поиск
Список
Период
Сортировка
От nicolas.garfinkiel@genesis-manlab.com.ar
Тема Re: migrate hashname function from 8.1.x to 8.4
Дата
Msg-id 4AFFC56900042BEF@ms2.iplannetworks.net
обсуждение исходный текст
Ответ на Re: migrate hashname function from 8.1.x to 8.4  (Craig Ringer <craig@postnewspapers.com.au>)
Ответы Re: migrate hashname function from 8.1.x to 8.4
Список pgsql-general
Hi Craig,

Thank you for your reply!

well, what i mean is that hashname() function would return a different value
depending the pgsql version.

Consider this query (note that i'm using some extra implicit cast functions
here):

SELECT password FROM user WHERE password = hashname('AZALEA')
UNION ALL
SELECT hashname('AZALEA')::text;

in 8.1.x it returns:

"-588380923"
"-588380923"

whereas in 8.4 this query only returns:

"-10546138"

And tweaking the query to show the difference more clearly:

SELECT password FROM user WHERE login = 'SIST'
UNION ALL
SELECT hashname('AZALEA')::text;

this returns:

"-588380923"
"-10546138"

Am I missing something?

Just a side note: our goal with this upgrade is to improve our system's performance
and stability (which 8.1 is not) while not embarking in any kind of refactoring,
as plans are underway to develop a new system. what we are looking for is
just a quick fix, if there's such thing out there!

Any thoughts?

 Original Message --
>Date: Tue, 11 Jan 2011 10:25:59 +1100
>From: Craig Ringer <craig@postnewspapers.com.au>
>To: Nicolas Garfinkiel <nicolas.garfinkiel@genesis-manlab.com.ar>
>CC: pgsql-general@postgresql.org
>Subject: Re: [GENERAL] migrate hashname function from 8.1.x to 8.4
>
>
>On 01/11/2011 02:09 AM, Nicolas Garfinkiel wrote:
>> Hi all,
>>
>> I?m trying to upgrade our pgsql from 8.1 to 8.4, but our system?s login
>> uses the hashname() function in order to get the proper password
>> validation. Now pgsql?s 8.4 hashname function is not compatible with
>> 8.1?s function. Do you have any ideas how I can reproduce 8.1 function
>> in 8.4?
>
>In what regard is it 'not compatible' ?
>
>Please provide output from 8.1 and 8.4 for one of the samples you're
>using, along with an explanation of what's causing you problems.
>
>--
>Craig Ringer
>
>--
>Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
>To make changes to your subscription:
>http://www.postgresql.org/mailpref/pgsql-general


В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Using aclitem[] at application layer
Следующее
От: "Karayappalli, Raghunath (Raghu)"
Дата:
Сообщение: database is growing... 1GB per day basis