Answers for "node-pg interval"

0

node-pg interval

// Expire after 30 days. If need some other unit, say second, 
// use '1 second' instead of '1 day'

pg.query(`
	UPDATE
		my_table
	SET
		expire_after = $1 * INTERVAL '1 day'
	RETURNING *
`, [30])
Posted by: Guest on May-08-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language