Home > Mobile >  POSTGRESQL: query that returns a column named valid with a boolean value that tells whether the limi
POSTGRESQL: query that returns a column named valid with a boolean value that tells whether the limi

Time:05-18

Like in Title, I have made so far

SELECT rolvaliduntil AS "valid" 
FROM pg_authid
WHERE rolname = 'limited'
AND rolvaliduntil > now();

I think this is not so hard but I cant find any method. Here is an image of what I would like to achieve

enter image description here

CodePudding user response:

Just add it to the SELECT list:

SELECT rolvaliduntil > now() AS "valid" 
FROM pg_authid
WHERE rolname = 'limited'
  • Related