Hi!
I'm very new in postgreSQL and i can't create a successfully connection to
my schema.
My database:
database: dspace
schema: public
owner of dspace database: dspace

I'm using this connection:
host: 127.0.0.1:5432
username:dspace
password: ******

When I connected with pgAdmin III to dspace database the query "select *
from item;" returns records.
The problem occurs when I use a php utility to be connected, and the above
query fails.
With the same php settings a query like "select * from pg_tables;" isn't
failed and returns records to php utility.

I tried "select * from public.item;" and "select * from dspace.public.item;"
with no result.

Any help would be appreciated.
Thank you,
Panagiotis

Search Discussions

  • Maximilian Tyrtania at Oct 10, 2008 at 6:00 am
    Hi Panagiotis,

    Am 09.10.2008 18:59 Uhr schrieb "Panagiotis Kontaxis" unter
    <pkontaxi@gmail.com>:
    I'm very new in postgreSQL and i can't create a successfully connection to my
    schema.
    Welcome to postgres and this list.
    My database:
    database: dspace
    schema: public
    owner of dspace database: dspace

    I'm using this connection:
    host: 127.0.0.1:5432 <http://127.0.0.1:5432>
    username:dspace
    password: ******

    When I connected with pgAdmin III to dspace database the query "select * from
    item;" returns records.
    The problem occurs when I use a php utility to be connected, and the above
    query fails.
    With the same php settings a query like "select * from pg_tables;" isn't
    failed and returns records to php utility.

    I tried "select * from public.item;" and "select * from dspace.public.item;"
    with no result.
    You don't need to name the schema if it is "public" because public is the
    default schema if you are connected to the correct database (although
    mentioning "public" doesn't hurt either).

    Could you maybe show us how exactly you establish the connection from within
    php? Do other queries work from within that connection?

    Also, remember to always check for errors after you issued a query.

    If you have more php specific question you might want to consider
    subscribing to the php-list, here:

    http://mail.postgresql.org/mj/mj_wwwusr/domain=postgresql.org?func=lists-lon
    g-full&extra=pgsql-php.

    There is also an archive you might want to look into at:

    http://archives.postgresql.org/pgsql-php/

    Best wishes,

    Maximilian Tyrtania
  • Panagiotis Kontaxis at Oct 10, 2008 at 7:18 am
    Thank you for your answer.
    I 'm connecting throught ADODB.
    My fault, I had to specify the dbname.
    I 'm coming from MySQL and I thought that every user has a default database,
    so no need to explicitly name it.

    Panagiotis


    2008/10/10 Maximilian Tyrtania <maximilian.tyrtania@onlinehome.de>
    Hi Panagiotis,

    Am 09.10.2008 18:59 Uhr schrieb "Panagiotis Kontaxis" unter
    <pkontaxi@gmail.com>:
    I'm very new in postgreSQL and i can't create a successfully connection to my
    schema.
    Welcome to postgres and this list.
    My database:
    database: dspace
    schema: public
    owner of dspace database: dspace

    I'm using this connection:
    host: 127.0.0.1:5432 <http://127.0.0.1:5432>
    username:dspace
    password: ******

    When I connected with pgAdmin III to dspace database the query "select * from
    item;" returns records.
    The problem occurs when I use a php utility to be connected, and the above
    query fails.
    With the same php settings a query like "select * from pg_tables;" isn't
    failed and returns records to php utility.

    I tried "select * from public.item;" and "select * from
    dspace.public.item;"
    with no result.
    You don't need to name the schema if it is "public" because public is the
    default schema if you are connected to the correct database (although
    mentioning "public" doesn't hurt either).

    Could you maybe show us how exactly you establish the connection from
    within
    php? Do other queries work from within that connection?

    Also, remember to always check for errors after you issued a query.

    If you have more php specific question you might want to consider
    subscribing to the php-list, here:


    http://mail.postgresql.org/mj/mj_wwwusr/domain=postgresql.org?func=lists-lon
    g-full&extra=pgsql-php<http://mail.postgresql.org/mj/mj_wwwusr/domain=postgresql.org?func=lists-long-full&extra=pgsql-php>
    .

    There is also an archive you might want to look into at:

    http://archives.postgresql.org/pgsql-php/

    Best wishes,

    Maximilian Tyrtania

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppgsql-novice @
categoriespostgresql
postedOct 9, '08 at 4:59p
activeOct 10, '08 at 7:18a
posts3
users2
websitepostgresql.org
irc#postgresql

People

Translate

site design / logo © 2022 Grokbase