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 7DE079DC820 for ; Tue, 31 Jan 2006 09:22:45 -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 58723-03 for ; Tue, 31 Jan 2006 09:22:48 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.metronet.co.uk (mail.metronet.co.uk [213.162.97.75]) by postgresql.org (Postfix) with ESMTP id 9761B9DC86C for ; Tue, 31 Jan 2006 09:22:42 -0400 (AST) Received: from mainbox.archonet.com (84-51-143-99.archon037.adsl.metronet.co.uk [84.51.143.99]) by smtp.metronet.co.uk (MetroNet Mail) with ESMTP id 9E29840C397; Tue, 31 Jan 2006 12:30:49 +0000 (GMT) Received: from [192.168.1.17] (client17.office.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id 562F815F10; Tue, 31 Jan 2006 12:30:37 +0000 (GMT) Message-ID: <43DF586C.1070009@archonet.com> Date: Tue, 31 Jan 2006 12:30:36 +0000 From: Richard Huxton User-Agent: Thunderbird 1.5 (X11/20051201) MIME-Version: 1.0 To: mario.splivalo@mobart.hr Cc: pgsql-sql@postgresql.org Subject: Re: CREATE VIEW form stored in database? References: <1138701111.8587.3.camel@localhost.localdomain> In-Reply-To: <1138701111.8587.3.camel@localhost.localdomain> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.113 required=5 tests=[AWL=0.113] X-Spam-Score: 0.113 X-Spam-Level: X-Archive-Number: 200601/217 X-Sequence-Number: 24006 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. -- Richard Huxton Archonet Ltd