Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

select * become select count(*) or what ?

Status
Not open for further replies.

aik2

Programmer
Jun 10, 2003
21
Hello All !

Sending query to postgresql like:
select * from MY_FUNCTION(1,2)
and get an error in log:
"error relation "MY_FUNCTION" does not exist"
"STATEMENT select count(*) from "MY_FUNCTION"

Running under Delphi6, dbExpress, postgresql 8...

Running query under pgAdminIII ok.
Running other queries from Deplhi ok.

Please advise,
Ilya
 
Hello! This a test sample:

CREATE TABLE _testdbf (fooid int, foosubid int, fooname text);
INSERT INTO _testdbf VALUES (1, 1, 'Joe');
INSERT INTO _testdbf VALUES (1, 2, 'Ed');
INSERT INTO _testdbf VALUES (2, 1, 'Mary');


CREATE FUNCTION _test(int,int,int,int) RETURNS SETOF _testdbf AS $$
SELECT * FROM _testdbf;
$$ LANGUAGE SQL;

Runs at pgAdmin3 correct.

Run under application and get a message:

relation "test" does not exist
STATEMENT: select count(*) from "_test"

I didn't really sure that it's problem of peostgresql, but I doubt that standart Delphi component joke on me :).





 
Thank you for help.

I find an error and this was a Delphi's component problem

 
Hi

Got it. Tried it. Works for me. ( I used Kylix 2 with dbExpress and PostgreSQL 7.3.3. )

After a couple of years of experience I usually blame dbExpress by default for all stupid behaviors.

Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top