pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedrelation X does not exist
2+ messages / 2 participants
[nested] [flat]
* relation X does not exist
@ 2004-04-13 12:49 Laura Scott <l.e.scott@larc.nasa.gov>
0 siblings, 1 reply; 2+ messages in thread
From: Laura Scott @ 2004-04-13 12:49 UTC (permalink / raw)
To: pgsql-sql
Morning,
I see lots of references to this error, but currently no fix for my
situation. I am converting an INFORMIX ESQL/C system to PostgreSQL
embedded C. I have hit several road blocks along the way and running
out of time to complete and test this convert - so I am coming to the
pros for some help.
I have a table defined with only two fields. The create table statement
did not have " " around the table name. I can cut and paste the query
from my debug statement into psql and get the desired result set back.
However, in the .pgc file, the query no matter how I write it (with " "
, without, uppercase....) I get the relation X does not exist. The
embedded query is
EXEC SQL select count(*) into :var1 from measurement_type where
meas_type = :val2. Both var1 and var2 are within the EXEC SQL DECLARE
section (host variables) and valid types. I can see the relation
measurement_type within psql when I do \dt and as I stated, putting the
exact query into psql gives me my count back.
Any ideas?
Thanks - Laura
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: relation X does not exist
@ 2004-04-20 01:11 Tom Lane <tgl@sss.pgh.pa.us>
parent: Laura Scott <l.e.scott@larc.nasa.gov>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2004-04-20 01:11 UTC (permalink / raw)
To: Laura Scott <l.e.scott@larc.nasa.gov>; +Cc: pgsql-sql
Laura Scott <l.e.scott@larc.nasa.gov> writes:
> I have a table defined with only two fields. The create table statement
> did not have " " around the table name. I can cut and paste the query
> from my debug statement into psql and get the desired result set back.
> However, in the .pgc file, the query no matter how I write it (with " "
> , without, uppercase....) I get the relation X does not exist.
Are you sure your ecpg program is connecting to the same database as
you're using manually? Perhaps it's connecting as a different userid
that has a different search path?
regards, tom lane
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2004-04-20 01:11 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-04-13 12:49 relation X does not exist Laura Scott <l.e.scott@larc.nasa.gov>
2004-04-20 01:11 ` Tom Lane <tgl@sss.pgh.pa.us>
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