24 lines
438 B
SQL
24 lines
438 B
SQL
--
|
|
-- Test VATIN extensions
|
|
--
|
|
|
|
CREATE EXTENSION vat;
|
|
|
|
-- Test valid conversions
|
|
SELECT 'ES40404040D'::VATIN,
|
|
'ES40404040-D'::VATIN,
|
|
' esx0523821l '::VATIN,
|
|
'ESM0243487d'::VATIN,
|
|
' ESb17616756 '::VATIN,
|
|
'ESb17385717'::VATIN,
|
|
'ESA08023780'::VATIN
|
|
;
|
|
|
|
-- Test invalid checksums
|
|
SELECT 'ES40414040D'::VATIN;
|
|
SELECT 'ESM0243487F'::VATIN;
|
|
SELECT 'ESB17616757'::VATIN;
|
|
|
|
-- Cleanup
|
|
DROP EXTENSION vat;
|