X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id C4F738B9F63 for ; Sun, 13 Feb 2005 17:50:07 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 99841-03 for ; Sun, 13 Feb 2005 17:50:01 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 271618B9F5C for ; Sun, 13 Feb 2005 17:50:00 +0000 (GMT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j1DHnket000339; Sun, 13 Feb 2005 12:49:46 -0500 (EST) To: Marc SCHAEFER Cc: pgsql-sql@postgresql.org Subject: Re: Order of columns in a table important in a stored procedure? In-reply-to: <20050213170347.GA2658@defian.alphanet.ch> References: <20050213170347.GA2658@defian.alphanet.ch> Comments: In-reply-to Marc SCHAEFER message dated "Sun, 13 Feb 2005 18:03:47 +0100" Date: Sun, 13 Feb 2005 12:49:45 -0500 Message-ID: <338.1108316985@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200502/138 X-Sequence-Number: 20249 Marc SCHAEFER writes: > I have however noticed that if the SELECT is *NOT* in the correct order > for the table saisies, funny errors happen (such as type constraints -- > obviously columns are mixed). > What I do not understand is that I use AS in order to name the columns, > I would think PostgreSQL could get the column names paired. It doesn't do it on the basis of column names. regards, tom lane