Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 04A996328B3 for ; Thu, 10 Jun 2010 07:57:34 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 55621-06 for ; Thu, 10 Jun 2010 10:57:25 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mail.postgresql.org (Postfix) with ESMTP id 951C26327F0 for ; Thu, 10 Jun 2010 07:57:26 -0300 (ADT) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OMfRq-0006g8-92 for pgsql-sql@postgresql.org; Thu, 10 Jun 2010 12:57:22 +0200 Received: from g224046125.adsl.alicedsl.de ([92.224.46.125]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 10 Jun 2010 12:57:22 +0200 Received: from tim by g224046125.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 10 Jun 2010 12:57:22 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: pgsql-sql@postgresql.org To: pgsql-sql@postgresql.org connect(): No such file or directory From: Tim Landscheidt Subject: Re: what does this do Date: Thu, 10 Jun 2010 10:57:07 +0000 Organization: Lines: 18 Message-ID: References: <201006100222.03196.johnf@jfcomputer.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: g224046125.adsl.alicedsl.de Mail-Copies-To: never User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:o5xgwmee6KcRXc9z2tSerSI7V2M= X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.011 tagged_above=-5 required=5 tests=BAYES_40=-0.001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201006/38 X-Sequence-Number: 34229 John wrote: > I have a piece of python code that excutes a SQL statement: > apitempCur.execute("select * from jfcs_balancedue('%s') f(enrolleeid varchar, > course_cost decimal, paid_amt decimal)" % (enrollIds,)); > The "enrollids" is a list of primary keys and the "jfcs_balancedue" is a user > defined function. What I don't understand is the "f(enrolleeid > varchar, ...)" I have no idea what it's for? Would some kind soul educate > me. You can omit the "AS" from "table_name AS alias (column_alias, ...)", but AFAIK PostgreSQL doesn't support specifying a data type for each column. Which DBMS is this code used for? Tim