Re: Is replacing transactions with CTE a good idea?

From: Dave Cramer <davecramer(at)postgres(dot)rocks>
To: Glen Huang <heyhgl(at)gmail(dot)com>
Cc: "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Is replacing transactions with CTE a good idea?
Date: 2021-04-01 15:04:04
Message-ID: CADK3HHL4jo1Ag8Wkz==FLM_1u4SKzHatjtngHkj7Z9eqUcajoA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 1 Apr 2021 at 10:50, Glen Huang <heyhgl(at)gmail(dot)com> wrote:

> 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?
>

I do not think a CTE changes the isolation level.

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

Dave Cramer
www.postgres.rocks

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rob Sargent 2021-04-01 15:04:29 Re: Is replacing transactions with CTE a good idea?
Previous Message Brian Dunavant 2021-04-01 14:58:25 Re: Is replacing transactions with CTE a good idea?