aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/pg/simple_ops.sql
blob: 9c063ec2577a91cca88b739b2868dec242e3e68f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
select 1p + 2p, +(1p), -(1p), 1p - 2p, 3p * 4p, 7p / 4p, 7p % 4p, "a"p || "b"p,
    pgdate('2001-09-28')+7,
    pgdate('2001-09-28') + pginterval('1 hour'),
    pgdate('2001-09-28') + pgtime('03:00'),
    pginterval('1 day') + pginterval('1 hour'),
    pgtimestamp('2001-09-28 01:00') + pginterval('23 hours'),
    pgtime('01:00') + pginterval('3 hours'),
    -pginterval('23 hours'),
    pgdate('2001-10-01') - pgdate('2001-09-28'),
    pgdate('2001-10-01') - 7,
    pgdate('2001-09-28') - pginterval('1 hour'),
    pgtime('05:00') - pgtime('03:00'),
    pgtime('05:00') - pginterval('2 hours'),
    pgtimestamp('2001-09-28 23:00') - pginterval('23 hours'),
    pginterval('1 day') - pginterval('1 hour'),
    pgtimestamp('2001-09-29 03:00') - pgtimestamp('2001-07-27 12:00'),
    pginterval('1 second') * 900.0,
    pginterval('1 hour') / 1.5;