Re: replace oidrand() with random_sample()

Поиск
Список
Период
Сортировка
От Neil Conway
Тема Re: replace oidrand() with random_sample()
Дата
Msg-id 1042742040.20006.90.camel@tokyo
обсуждение исходный текст
Ответ на Re: replace oidrand() with random_sample()  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
Ответы Re: replace oidrand() with random_sample()  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-patches
On Wed, 2003-01-15 at 23:45, Christopher Kings-Lynne wrote:
> C'mon guys!  We really have to leave it!  It's of no consequence to us to
> leave it there

It is, though. Continuing to maintain old, crufty code that is no longer
used *does* have a finite cost. Consider the security holes during
7.2.x: the majority of those were found in code that was written years
ago, and only occaisonally looked at since (e.g. the geometry types).

> backwards compatibility is really, really important!

Agreed, but given that this feature

    (a) was completely undocumented

    (b) strangely named

You would have to try *pretty hard* just to know that it existed. And
even if you decided to use it in an application, it won't take much more
than grepping for 'oidrand' and replacing it with 'random() < 1.0/y' in
order to upgrade to 7.4.

(That's in contrast to things like tightening the rules for varchar
input, which aren't trivial to workaround -- in *that* case, I can see
the need for special arrangements for backward-compatibility...)

Cheers,

Neil

P.S. Is there a reason for keeping nullvalue() and nonnullvalue() in
misc.c?

--
Neil Conway <neilc@samurai.com> || PGP Key ID: DB3C29FC




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

Предыдущее
От: Rod Taylor
Дата:
Сообщение: Re: ALTER TABLE .. SET WITHOUT OIDS -- ROUND 2
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: ALTER TABLE .. SET WITHOUT OIDS -- ROUND 2