3 ms·
That's also not completely acurate: postgres=> SELECT now(), now(), clock_timestamp(), clock_timestamp(); now | now
by cleansy 11y ago
That's also not completely acurate:
postgres=> SELECT now(), now(), clock_timestamp(), clock_timestamp();
now | now | clock_timestamp | clock_timestamp
-------------------------------+-------------------------------+-------------------------------+------------------------------
2015-09-11 09:57:00.414422+00 | 2015-09-11 09:57:00.414422+00 | 2015-09-11 09:57:00.419087+00 | 2015-09-11 09:57:00.41909+00
Now() stays the same for the entire statement as well. clock_timestamp() doesn't.
- fgutmann 11y agoIf you ever manage to have multiple transactions in one statement please email me.
- deleted 11y ago[deleted]
- lsaferite 11y agoThanks for the chuckle. (Yes, I know this adds nothing to the discussion)
- AlterEgo20 11y agoEasy. Just use dblink or foreign table to execute part of the statement inside other transaction. dblink to the same server/db is often used as way to create an "AUTONOMOUS_TRANSACTION"