Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 72F2E9FB3DF for ; Fri, 19 Jan 2007 12:18:34 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 30964-02 for ; Fri, 19 Jan 2007 12:18:19 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from momjian.us (momjian.us [70.90.9.53]) by postgresql.org (Postfix) with ESMTP id 28DEB9FB3D0 for ; Fri, 19 Jan 2007 12:18:19 -0400 (AST) Received: (from bruce@localhost) by momjian.us (8.11.6/8.11.6) id l0JGIJt11154 for pgsql-www@postgresql.org; Fri, 19 Jan 2007 11:18:19 -0500 (EST) From: Bruce Momjian Message-Id: <200701191618.l0JGIJt11154@momjian.us> Subject: Re: [pgsql-patches] subject tag To: PostgreSQL www Date: Fri, 19 Jan 2007 11:18:19 -0500 (EST) X-Mailer: ELM [version 2.4ME+ PL123] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/66 X-Sequence-Number: 11333 Why does the patches list now have a lowercase tag, "[pgsql-patches]"? The jobs list is also lowercase. --------------------------------------------------------------------------- ----- Forwarded message from FAST PostgreSQL ----- X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 X-SEF-Processed: 5_0_0_816__2007_01_19_17_44_12 Date: Sat, 20 Jan 2007 04:44:51 +1100 From: FAST PostgreSQL Reply-To: FAST PostgreSQL To: Neil Conway cc: pgsql-patches@postgresql.org Message-ID: <12753.10921169188931.fast.fujitsu.com.au@MHS> In-Reply-To: <1169186550.27197.10.camel@localhost.localdomain> References: <12753.10901169180733.fast.fujitsu.com.au@MHS> References: <1169186550.27197.10.camel@localhost.localdomain> Subject: Re: [pgsql-patches] pg_get_domaindef x-scalix-Hops: 1 Organization: FAST X-Mailer: KMail [version 1.3.2] Content-Disposition: inline X-Virus-Scanned: by amavisd-new at mail1.fujitsu.com.au X-Virus-Scanned: Maia Mailguard 1.0.1 X-Mailing-List: pgsql-patches List-Archive: List-Help: List-Id: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Precedence: bulk Sender: pgsql-patches-owner@postgresql.org On Fri, 19 Jan 2007 17:02, Neil Conway wrote: > On Sat, 2007-01-20 at 02:28 +1100, FAST PostgreSQL wrote: > > Attached is a small patch that implements the pg_get_domaindef(oid) > > function. > > A few minor comments: > > - don't use C++-style comments OK. Can do. > > - why does this code append a "-" to the output when SPI_processed != 1, > rather than erroring out? get_ruledef() does the same. As the user gets a '-' in that case when a non-existent oid is given, I just wanted to be consistent. Maybe a wrong idea ? > > - you probably want to elog(ERROR) if typeTuple is invalid: Of course. > + if (typnotnull || constraint != NULL) > + { > + if ( ( (contype != NULL) && (strcmp(contype, > "c") != 0) ) || typnotnull ) > + { > + appendStringInfo(&buf, "CONSTRAINT "); > + } > + if (typnotnull) > + { > + appendStringInfo(&buf, "NOT NULL "); > + } > + } > + if (constraint != NULL) > + { > + appendStringInfo(&buf, > quote_identifier(constraint)); > + } > > This logic seems pretty awkward. Perhaps simpler would be a check for > typnotnull (and then appending "CONSTRAINT NOT NULL"), and then handling > the non-typnotnull branch separately. Yeah agree. > > -Neil Rgds, Arul Shaji This is an email from Fujitsu Australia Software Technology Pty Ltd, ABN 27 003 693 481. It is confidential to the ordinary user of the email address to which it was addressed and may contain copyright and/or legally privileged information. No one else may read, print, store, copy or forward all or any of it or its attachments. If you receive this email in error, please return to sender. Thank you. If you do not wish to receive commercial email messages from Fujitsu Australia Software Technology Pty Ltd, please email unsubscribe@fast.fujitsu.com.au ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend ----- End of forwarded message from FAST PostgreSQL ----- -- Bruce Momjian bruce@momjian.us EnterpriseDB http://www.enterprisedb.com + If your life is a hard drive, Christ can be your backup. +