Is replacing transactions with CTE a good idea?

From: Glen Huang <heyhgl(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Is replacing transactions with CTE a good idea?
Date: 2021-04-01 14:49:38
Message-ID: DED55D28-088A-432E-B961-15567A5BD1CC@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all,

From application’s standpoint, it seems using CTE saves a lot work. You no longer need to parse values out only to pass them back in, and only one round-trip to the db server.

If I’m not wrong, CTE is equivalent to serializable transactions? So I guess the downsize is that quarries can’t be run in parallel?

If I decide to replace all my transaction code with CTE, will I shoot myself in the foot down the road?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Brian Dunavant 2021-04-01 14:58:25 Re: Is replacing transactions with CTE a good idea?
Previous Message Glen Huang 2021-04-01 14:36:56 Re: How to implement expiration in PostgreSQL?