Ivan Petrov <ipp@mail.bg> writes:
> I am using ODBC driver to connect to Postgres via Delphi.
> It works fine, except a problem "ERROR: relation
> "sec_users" does not exist" and table sec_users exists in
> the database. I tried with public.sec_users and it is the
> same.
> In psql console application :
> auto=3D# select user_id
> auto-# from sec_users
> auto-# where user_name =3D 'postgres'
> auto-# and is_locked =3D false
> auto-# and passwd =3D md5('postgres')
> auto-# and (password_expire_date > current_timestamp or
> auto(# password_expire_date is null);
> user_id
> ---------
> 1
> (1 row)
> But I can not figure out why it doesn't work from ODBC ...
Sure you're connecting to the same database in both cases? As the same
user? (If they are different users, maybe one has a different schema
search_path set by default?)
regards, tom lane