No length checking for "name" input - Mailing list pgsql-bugs

From Donald Fraser
Subject No length checking for "name" input
Date
Msg-id 00a601c64c6f$6321acf0$0264a8c0@demolish1
Whole thread Raw
Responses Re: No length checking for "name" input
List pgsql-bugs
PostgreSQL versions: 7.4.x and 8.0.x
(I don't have a 8.1.x installation to test against)

There appears to be no length checking for data types of "name".

For example:
template1=3D# SELECT length('rpt_cisx_total_principal_amount_of_security_ty=
pe_between_dates('::name) AS name_len;
 name_len
----------
       63
(1 row)

I get exactly the same result for this query which is obviously not the sam=
e length and yet I get no error?

template1=3D# SELECT length('rpt_cisx_total_principal_amount_of_security_ty=
pe_between_dates(date,date)'::name) AS name_len;
 name_len
----------
       63
(1 row)

I don't know whether you consider this a bug, certainly most of the other d=
ata types appear to have range checking as part of the input.

Regards
Donald Fraser=

pgsql-bugs by date:

Previous
From: "Anton"
Date:
Subject: BUG #2343: Silent installers fails
Next
From: "Kashin Oleg"
Date:
Subject: BUG #2345: odbc driver doesn't work