pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Joe Tailleur <joe.tailleur@gmail.com>
To: Pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: Extra brackets when viewing SQL
Date: Thu, 10 Dec 2020 07:48:40 -0700
Message-ID: <CAPZdUVph0JmBLssbaxAVNDLSt8TxJj7d2COsTG2_pRxLPFSX9w@mail.gmail.com> (raw)

Hi all,

In version 4.27 when I viewed my SQL (sql tab when highlighting an item).

For example:
CREATE OR REPLACE VIEW asap.view_assignment
 AS
 SELECT pa.assign_id,
    pa.proj_id,
    pa.date_assigned,
    pa.time_assigned,
    au.user_name AS assigned_to,
    pa.assigned_level,
    pa.note,
    eb.user_name AS assigned_by
   FROM proj_assign pa
     JOIN asap_users au ON au.user_uid = pa.assigned_to_user
     LEFT JOIN asap_users eb ON eb.user_uid = pa.assigned_by_user;


In version 4.28 (and 4.29)
CREATE OR REPLACE VIEW asap.view_assignment
 AS
 SELECT pa.assign_id,
    pa.proj_id,
    pa.date_assigned,
    pa.time_assigned,
    au.user_name AS assigned_to,
    pa.assigned_level,
    pa.note,
    eb.user_name AS assigned_by
   FROM ((proj_assign pa
     JOIN asap_users au ON ((au.user_uid = pa.assigned_to_user)))
     LEFT JOIN asap_users eb ON ((eb.user_uid = pa.assigned_by_user)));

I really don't like the extra brackets that are being placed around the
FROM and JOINs, and they show up as well in CASE statements within SELECT
and other sections as well.  Can I somehow disable this?  It's a real pain
in the butt.

Joe.

view thread (3+ messages)  latest in thread

Message-ID: <CAPZdUVph0JmBLssbaxAVNDLSt8TxJj7d2COsTG2_pRxLPFSX9w@mail.gmail.com>
Permalink:  ../CAPZdUVph0JmBLssbaxAVNDLSt8TxJj7d2COsTG2_pRxLPFSX9w@mail.gmail.com/
Also on:    postgresql.org/message-id/CAPZdUVph0JmBLssbaxAVNDLSt8TxJj7d2COsTG2_pRxLPFSX9w@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: joe.tailleur@gmail.com
  Subject: Re: Extra brackets when viewing SQL
  In-Reply-To: <CAPZdUVph0JmBLssbaxAVNDLSt8TxJj7d2COsTG2_pRxLPFSX9w@mail.gmail.com>
  References: <CAPZdUVph0JmBLssbaxAVNDLSt8TxJj7d2COsTG2_pRxLPFSX9w@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox