pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mario Splivalo <mario.splivalo@mobart.hr>
To: pgsql-sql@postgresql.org
Subject: CREATE VIEW form stored in database?
Date: Tue, 31 Jan 2006 10:51:51 +0100
Message-ID: <1138701111.8587.3.camel@localhost.localdomain> (raw)

When I create a view, I like to define it like this (just representing
the form here):

CREATE VIEW vw_my_view
AS
SELECT
	t1.col1,
	t2.col2
FROM
	t1
	JOIN t2
		ON t1.col1 = t2.col3
WHERE
	t2.col4 = 'bla'


But, when I extracit it from postgres, it's somehow stored like this:

CREATE VIEW vw_my_view
AS
SELECT	t1.col1, t2.col2
FROM	t1
JOIN	t2 ON t1.col1 = t2.col3
WHERE	t2.col4 = 'bla'

The later is much more hard to read, and when I need to change the view,
i get rash and stuff :)

Is there a way to tell postgres NOT to format the 'source code' of my
views?

	Mike
-- 
Mario Splivalo
Mob-Art
mario.splivalo@mobart.hr

"I can do it quick, I can do it cheap, I can do it well. Pick any two."





view thread (5+ messages)  latest in thread

Message-ID: <1138701111.8587.3.camel@localhost.localdomain>
Permalink:  ../1138701111.8587.3.camel@localhost.localdomain/
Also on:    postgresql.org/message-id/1138701111.8587.3.camel@localhost.localdomain

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: mario.splivalo@mobart.hr
  Subject: Re: CREATE VIEW form stored in database?
  In-Reply-To: <1138701111.8587.3.camel@localhost.localdomain>

* 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