poorly written builtin functions

Started by Neil Conwayover 22 years ago4 messages
#1Neil Conway
neilc@samurai.com
1 attachment(s)

I'm working on writing a script that automatically tests all the
built-in functions. As a first step, I just passed NULL for all
of the arguments for each built-in function. I've attached a
list of the 90 functions that crash the backend when this is done.

Since the culprit functions all seem related (I believe they're
all generated by src/backend/utils/mb/conversion_procs), I'd
imagine this should be pretty easy to fix. I haven't played
with this part of the backend before, so if someone else would
like to make the necessary changes, let me know. Otherwise
I'll do it.

As for the testing script itself, it's not finished (testing
NULL inputs is just a trivial first step); when it's done, I'll
submit it for inclusion in CVS.

-Neil

Attachments:

bad-functionstext/plain; charset=us-asciiDownload
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Neil Conway (#1)
Re: poorly written builtin functions

Neil Conway <neilc@samurai.com> writes:

Since the culprit functions all seem related (I believe they're
all generated by src/backend/utils/mb/conversion_procs), I'd
imagine this should be pretty easy to fix.

They should all be marked STRICT. Not sure how this got missed before;
thanks for catching it.

regards, tom lane

#3Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Neil Conway (#1)
Re: poorly written builtin functions

I assume this has been addressed?

---------------------------------------------------------------------------

Neil Conway wrote:

I'm working on writing a script that automatically tests all the
built-in functions. As a first step, I just passed NULL for all
of the arguments for each built-in function. I've attached a
list of the 90 functions that crash the backend when this is done.

Since the culprit functions all seem related (I believe they're
all generated by src/backend/utils/mb/conversion_procs), I'd
imagine this should be pretty easy to fix. I haven't played
with this part of the backend before, so if someone else would
like to make the necessary changes, let me know. Otherwise
I'll do it.

As for the testing script itself, it's not finished (testing
NULL inputs is just a trivial first step); when it's done, I'll
submit it for inclusion in CVS.

-Neil

[ Attachment, skipping... ]

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#4Neil Conway
neilc@samurai.com
In reply to: Bruce Momjian (#3)
Re: poorly written builtin functions

On Sun, Aug 17, 2003 at 12:39:53AM -0400, Bruce Momjian wrote:

I assume this has been addressed?

Yes, Tom checked a fix into CVS for the functions in question.

-Neil