Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

select * become select count(*) or what ?

select * become select count(*) or what ?

select * become select count(*) or what ?

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,

RE: select * become select count(*) or what ?


You did not gave enough details about your function, but I think you simply need :


select MY_FUNCTION(1,2);


RE: select * become select count(*) or what ?

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;

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 :).

RE: select * become select count(*) or what ?

Thank you for help.

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

RE: select * become select count(*) or what ?


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.


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close