X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id A946B9DD9B8 for ; Thu, 12 Jan 2006 21:18:39 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 39530-03-6 for ; Thu, 12 Jan 2006 21:18:38 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from a2s5.a2hosting.com (host-209-124-50-10.a2webhosting.com [209.124.50.10]) by postgresql.org (Postfix) with ESMTP id 551579DD907 for ; Thu, 12 Jan 2006 21:14:45 -0400 (AST) Received: from adsl-155-31-135.tys.bellsouth.net ([68.155.31.135] helo=[192.168.1.10]) by a2s5.a2hosting.com with esmtpsa (TLSv1:RC4-SHA:128) (Exim 4.52) id 1ExDWg-00088n-Pm for pgsql-sql@postgresql.org; Thu, 12 Jan 2006 20:14:46 -0500 Mime-Version: 1.0 (Apple Message framework v746.2) Content-Transfer-Encoding: 7bit Message-Id: <304B868D-CE4E-4E43-8B85-4CA238BB0F94@pgedit.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed To: "'pgsql-sql@postgresql.org' SQL" From: John DeSoi Subject: info is a reserved word? Date: Thu, 12 Jan 2006 20:14:42 -0500 X-Mailer: Apple Mail (2.746.2) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - a2s5.a2hosting.com X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - pgedit.com X-Source: X-Source-Args: X-Source-Dir: X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.144 required=5 tests=[AWL=0.144] X-Spam-Score: 0.144 X-Spam-Level: X-Archive-Number: 200601/55 X-Sequence-Number: 23844 I have two identical functions below, the only difference is I declared my variable name to be 'info' instead of 'stuff'. I could not find anywhere in the docs that 'info' has any special meaning. Did I miss it? create type my_info as ( a text, b text ); -- this works create or replace function my_stuff () returns my_info as $$ declare stuff my_info; begin stuff.a := 'hi'; stuff.b := 'there'; return stuff; end; $$ language plpgsql; create or replace function my_stuff () returns my_info as $$ declare info my_info; begin info.a := 'hi'; info.b := 'there'; return info; end; $$ language plpgsql; Evaluating this definition gives: psql:16: ERROR: syntax error at or near "info" at character 71 psql:16: LINE 4: info my_info; psql:16: ^ pg 8.1.1, OS X 10.4.3 John DeSoi, Ph.D. http://pgedit.com/ Power Tools for PostgreSQL