X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 863B59DC990 for ; Tue, 31 Jan 2006 09:53:33 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 61560-06 for ; Tue, 31 Jan 2006 09:53:37 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from pjetlic.mobart.hr (pjetlic.mobart.hr [80.80.51.10]) by postgresql.org (Postfix) with ESMTP id 3894C9DC820 for ; Tue, 31 Jan 2006 09:53:31 -0400 (AST) Received: from localhost (localhost.localdomain [127.0.0.1]) by pjetlic.mobart.hr (Postfix) with ESMTP id B721817A13; Tue, 31 Jan 2006 14:53:34 +0100 (CET) Received: from pjetlic.mobart.hr ([127.0.0.1]) by localhost (pjetlic [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 09190-02; Tue, 31 Jan 2006 14:53:34 +0100 (CET) Received: from mike.mobart.hr (mike.mobart.hr [192.168.10.94]) (using SSLv3 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by pjetlic.mobart.hr (Postfix) with ESMTP id 936B617A11; Tue, 31 Jan 2006 14:53:34 +0100 (CET) Subject: Re: CREATE VIEW form stored in database? From: Mario Splivalo Reply-To: mario.splivalo@mobart.hr To: Richard Huxton Cc: pgsql-sql@postgresql.org In-Reply-To: <43DF586C.1070009@archonet.com> References: <1138701111.8587.3.camel@localhost.localdomain> <43DF586C.1070009@archonet.com> Content-Type: text/plain Organization: Mob-Art Date: Tue, 31 Jan 2006 14:53:34 +0100 Message-Id: <1138715614.8587.5.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.4.1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by OpenSource AV+AS Mail Server X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.093 required=5 tests=[AWL=0.093] X-Spam-Score: 0.093 X-Spam-Level: X-Archive-Number: 200601/218 X-Sequence-Number: 24007 On Tue, 2006-01-31 at 12:30 +0000, Richard Huxton wrote: > Mario Splivalo wrote: > > When I create a view, I like to define it like this (just representing > > the form here): > [snip] > > But, when I extracit it from postgres, it's somehow stored like this: > [snip] > > 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? > > I don't think it stores the "source code", but rather the structure of > the underlying query. So I'm afraid you lose the spacing. > > I keep all my definitions in a set of files and read in updates with \i > my_filename.sql from psql. That lets me keep all my spaces and comments. > Yes, I'm tied to the pgadmin3 for the moment, so there's nothing I could do. It's a pain to develop a database such way. 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."