-- table operation tests
DROP TABLE IF EXISTS bs_date_table;

CREATE TABLE bs_date_table(
    id SERIAL PRIMARY KEY,
    ad date,
    bs bs_date
);

INSERT INTO bs_date_table
(ad, bs)
VALUES
('2001/02/01', '2056/10/19'), 
('2002/02/01', '2057/10/19'),
('1972-02-17', '2028-11-05'),
('1968-10-07', '2025-06-22');

INSERT INTO bs_date_table 
(ad, bs)
VALUES 
('2001-02-01', ad_to_bs('2001/02/01'));

SELECT * FROM bs_date_table;
SELECT * FROM bs_date_table ORDER BY bs;
SELECT * FROM bs_date_table ORDER BY bs DESC;
SELECT * FROM bs_date_table WHERE bs < '2056/10/19';
SELECT * FROM bs_date_table WHERE bs <= '2056/10/19';
SELECT * FROM bs_date_table WHERE bs > '2056/10/19';
SELECT * FROM bs_date_table WHERE bs >= '2056/10/19';
SELECT * FROM bs_date_table WHERE bs = '2056/10/19';
SELECT * FROM bs_date_table WHERE bs != '2056/10/19';
SELECT * FROM bs_date_table WHERE bs <> '2056/10/19';