relation X does not exist

Поиск
Список
Период
Сортировка
От Laura Scott
Тема relation X does not exist
Дата
Msg-id 407BE1E3.39509CB@larc.nasa.gov
обсуждение исходный текст
Ответы Re: relation X does not exist
Список 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



В списке pgsql-sql по дате отправления:

Предыдущее
От: Jeff Boes
Дата:
Сообщение: Re: SQL challenge--top 10 for each key value?
Следующее
От: Charles Wilt
Дата:
Сообщение: Re: Database triggers