Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id E94429FB509 for ; Tue, 3 Jul 2007 14:37:06 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 72296-07 for ; Tue, 3 Jul 2007 14:37:01 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.183]) by postgresql.org (Postfix) with ESMTP id 92E669FB2EA for ; Tue, 3 Jul 2007 14:37:02 -0300 (ADT) Received: by py-out-1112.google.com with SMTP id d32so4071623pye for ; Tue, 03 Jul 2007 10:37:01 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:subject:from:reply-to:to:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer:content-transfer-encoding; b=OIUqCX8iHiAy6Kk212ENar5EpYYRtMDvaCS/TjNeJBr8Co3Je1KRU8PRIOOotBqf1p6hhiXKO2JSTD3hlxINlGhZ0EnPeK/Zzy4A9Uv+GitUZyy/uWdv0jwQLNBPGnGftlCiel/CcxSYIrA59/HgWQWoSIF6geoToIe9kwdoHNs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:subject:from:reply-to:to:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer:content-transfer-encoding; b=l+yG1RSpGeCNO5228X6UcPOiqrXozhqhB1WQ08Mopbb5NinHs/et2bIeTuxbyotuts83Ai3oNlfPmzigSZ50n/Pmvi9SOtGE9GpSkN/rHWNXYgP9y0tv8XS8sf0acDPmN4KRoi6FBLTipIVQpx/fE8ZqO0bL8XfN4eCGe6cLCZk= Received: by 10.35.41.12 with SMTP id t12mr8204125pyj.1183484221875; Tue, 03 Jul 2007 10:37:01 -0700 (PDT) Received: from ?192.168.1.83? ( [206.114.45.106]) by mx.google.com with ESMTP id 15sm30500588nzo.2007.07.03.10.37.00 (version=SSLv3 cipher=RC4-MD5); Tue, 03 Jul 2007 10:37:01 -0700 (PDT) Subject: Re: Informix Schema -> PostgreSQL ? From: Adam Tauno Williams Reply-To: adamtaunowilliams@gmail.com To: pgsql-sql@postgresql.org In-Reply-To: <468A77B6.2070706@noaa.gov> References: <468A77B6.2070706@noaa.gov> Content-Type: text/plain Date: Tue, 03 Jul 2007 13:35:06 -0400 Message-Id: <1183484106.4492.17.camel@aleph.whitemice.org> Mime-Version: 1.0 X-Mailer: Evolution 2.8.2 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/20 X-Sequence-Number: 28755 On Tue, 2007-07-03 at 12:22 -0400, Mark Fenbers wrote: > I am an ex-Informix convert. Informix used the term "schema" to refer > to the SQL-format definition of how a table or view was created. E.g., > CREATE TABLE john ( char(8) lid, ...); Some views we have are quite > complex (and not created by me) and I want to create a similar one in > Pg. If I could see the view in this SQL format, then I could use SQL to > create another one using this as a template. > > pgadmin3 can show this definition in SQL format, but I can't use > pgadmin3 on a certain box. How can I show information in Pg (psql) the > way that Informix would show a schema? > > BTW, what does PostgreSQL call this (what Informix calls a schema)?? Just use pg_dump to dump/backup the schema. Don't include the data; it is just like doing an Informix "dbschema -d {database}" pg_dump -U OGo --schema-only OGo -- Adam Tauno Williams, Network & Systems Administrator Consultant - http://www.whitemiceconsulting.com Developer - http://www.opengroupware.org