postgresql cast extract code example
Example 1: postgresql get year
select extract(year from your_column) from your_table;
Example 2: postgresql cast
SELECT '100'::INTEGER;
SELECT CAST ('100' AS INTEGER);
select extract(year from your_column) from your_table;
SELECT '100'::INTEGER;
SELECT CAST ('100' AS INTEGER);