Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id B83A419713C6 for ; Tue, 6 Dec 2011 12:55:02 -0400 (AST) Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RXyIH-0000ME-D1 for pgsql-bugs@postgresql.org; Tue, 06 Dec 2011 16:55:01 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id pB6GsmOd022377; Tue, 6 Dec 2011 11:54:48 -0500 (EST) To: Jivendra cc: pgsql-bugs@postgresql.org Subject: Re: copy cmd err In-reply-to: References: Comments: In-reply-to Jivendra message dated "Tue, 06 Dec 2011 12:39:44 +0530" Date: Tue, 06 Dec 2011 11:54:48 -0500 Message-ID: <22376.1323190488@sss.pgh.pa.us> From: Tom Lane X-Pg-Spam-Score: -3.1 (---) X-Archive-Number: 201112/52 X-Sequence-Number: 31863 Jivendra writes: > Server Ver : psql (PostgreSQL) 8.1.11 > OS Platform : Red Hat Enterprise Linux Server release 5.3 (Tikanga) > COPY (SELECT * from function_name (2, 0, 'yyyy-mm-dd','yyyy-mm-dd')) TO > STDOUT That COPY syntax doesn't exist in PG 8.1 --- the option to have a parenthesized query as the source was added in 8.2. Even within the RHEL5 world, 8.1.11 is mighty obsolete. Red Hat is currently shipping 8.1.23, or you can get 8.4.x in the postgresql84 package set, or you could use Devrim's packages if you don't feel a need to be all-Red-Hat. regards, tom lane