info is a reserved word?

From: John DeSoi <desoi(at)pgedit(dot)com>
To: "'pgsql-sql(at)postgresql(dot)org' SQL" <pgsql-sql(at)postgresql(dot)org>
Subject: info is a reserved word?
Date: 2006-01-13 01:14:42
Message-ID: 304B868D-CE4E-4E43-8B85-4CA238BB0F94@pgedit.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-sql

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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Fuhr 2006-01-13 01:29:32 Re: info is a reserved word?
Previous Message Josh Berkus 2006-01-13 01:11:39 Re: Contrib Schemas

Browse pgsql-sql by date

  From Date Subject
Next Message Michael Fuhr 2006-01-13 01:29:32 Re: info is a reserved word?
Previous Message Markus Schaber 2006-01-12 17:04:47 Re: exceptions in rules