From: TJ O'Donnell <tjo@acm.org>
To: pgsql-sql@postgresql.org
Subject: sql error creating function
Date: Thu, 10 Aug 2006 17:33:32 -0700
Message-ID: <44DBD05C.9020800@acm.org> (raw)
When I psql -f f.sql
I get the following error:
psql:f.sql:10: ERROR: relation "fragset" does not exist
CONTEXT: SQL function "fragments"
> cat f.sql
Create Or Replace Function fragments(character varying)
Returns setof character varying
As $$
Create Temporary Table fragset (smiles character varying);
Insert into fragset Values ('COCNC');
Insert into fragset Values ('COCNCc1ccccc1');
Select smiles from fragset;
$$ Language SQL;
But, if I paste into a running psql the commands:
Create Temporary Table fragset (smiles character varying);
Insert into fragset Values ('COCNC');
Insert into fragset Values ('COCNCc1ccccc1');
Select smiles from fragset;
it works fine.
What is wrong in the function definition?
I'm using 8.1.3
Thanks,
TJ O'Donnell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tjo@acm.org
Subject: Re: sql error creating function
In-Reply-To: <44DBD05C.9020800@acm.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox