mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	Additional unicode primitive functions.
Introduce unicode_version(), icu_unicode_version(), and unicode_assigned(). The latter requires introducing a new lookup table for the Unicode General Category, which is generated along with the other Unicode lookup tables. Discussion: https://postgr.es/m/CA+TgmoYzYR-yhU6k1XFCADeyj=Oyz2PkVsa3iKv+keM8wp-F_A@mail.gmail.com Reviewed-by: Peter Eisentraut
This commit is contained in:
		@@ -5,6 +5,10 @@ SELECT getdatabaseencoding() <> 'UTF8' AS skip_test \gset
 | 
			
		||||
 | 
			
		||||
SELECT U&'\0061\0308bc' <> U&'\00E4bc' COLLATE "C" AS sanity_check;
 | 
			
		||||
 | 
			
		||||
SELECT unicode_version() IS NOT NULL;
 | 
			
		||||
SELECT unicode_assigned(U&'abc');
 | 
			
		||||
SELECT unicode_assigned(U&'abc\+10FFFF');
 | 
			
		||||
 | 
			
		||||
SELECT normalize('');
 | 
			
		||||
SELECT normalize(U&'\0061\0308\24D1c') = U&'\00E4\24D1c' COLLATE "C" AS test_default;
 | 
			
		||||
SELECT normalize(U&'\0061\0308\24D1c', NFC) = U&'\00E4\24D1c' COLLATE "C" AS test_nfc;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user