mirror of
https://github.com/postgres/postgres.git
synced 2025-11-06 07:49:08 +03:00
Allow empty content in xml type
The xml type previously rejected "content" that is empty or consists only of spaces. But the SQL/XML standard allows that, so change that. The accepted values for XML "documents" are not changed. Reviewed-by: Ali Akbar <the.apaan@gmail.com>
This commit is contained in:
@@ -60,6 +60,8 @@ SELECT xmlelement(name foo, xmlattributes('infinity'::timestamp as bar));
|
||||
SELECT xmlelement(name foo, xmlattributes('<>&"''' as funny, xml 'b<a/>r' as funnier));
|
||||
|
||||
|
||||
SELECT xmlparse(content '');
|
||||
SELECT xmlparse(content ' ');
|
||||
SELECT xmlparse(content 'abc');
|
||||
SELECT xmlparse(content '<abc>x</abc>');
|
||||
SELECT xmlparse(content '<invalidentity>&</invalidentity>');
|
||||
@@ -69,6 +71,8 @@ SELECT xmlparse(content '<relativens xmlns=''relative''/>');
|
||||
SELECT xmlparse(content '<twoerrors>&idontexist;</unbalanced>');
|
||||
SELECT xmlparse(content '<nosuchprefix:tag/>');
|
||||
|
||||
SELECT xmlparse(document '');
|
||||
SELECT xmlparse(document ' ');
|
||||
SELECT xmlparse(document 'abc');
|
||||
SELECT xmlparse(document '<abc>x</abc>');
|
||||
SELECT xmlparse(document '<invalidentity>&</abc>');
|
||||
|
||||
Reference in New Issue
Block a user