2023-01-21 18:31:50 +00:00
|
|
|
--
|
|
|
|
-- Test VATIN extensions
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE EXTENSION vat;
|
|
|
|
|
|
|
|
-- Test valid conversions
|
|
|
|
SELECT 'ES40404040D'::VATIN,
|
|
|
|
'ES40404040-D'::VATIN,
|
|
|
|
' esx0523821l '::VATIN,
|
|
|
|
'ESM0243487d'::VATIN,
|
2023-06-20 17:41:54 +00:00
|
|
|
' ESb17616756 '::VATIN,
|
2023-07-02 23:38:00 +00:00
|
|
|
'ESb17385717'::VATIN,
|
|
|
|
'ESA08023780'::VATIN
|
2023-01-21 18:31:50 +00:00
|
|
|
;
|
|
|
|
|
|
|
|
-- Test invalid checksums
|
|
|
|
SELECT 'ES40414040D'::VATIN;
|
|
|
|
SELECT 'ESM0243487F'::VATIN;
|
|
|
|
SELECT 'ESB17616757'::VATIN;
|
|
|
|
|
|
|
|
-- Cleanup
|
|
|
|
DROP EXTENSION vat;
|