Weird, you seem to have a DB connection.
Try something that does not need a table, like
select current_time;
Did you create 'testdb' and was 'testable' actually created there ?
Can you connect to the DB on the command line ?
$ psql testdb
girba=# \l
� � � � � � � � � � � � � � ��List of databases
���Name� ��| Owner | Encoding |���Collate���|� ��Ctype� ��| Access privileges�
-----------+-------+----------+-------------+-------------+-------------------
�girba�� ��| girba | UTF8�� ��| en_US.UTF-8 | en_US.UTF-8 |�
�postgres��| girba | UTF8�� ��| en_US.UTF-8 | en_US.UTF-8 |�
�template0 | girba | UTF8�� ��| en_US.UTF-8 | en_US.UTF-8 | =c/girba�� � � ��+
�� � � � ��|�� � ��|� � � � ��|�� � � � � ��|�� � � � � ��| girba=CTc/girba
�template1 | girba | UTF8�� ��| en_US.UTF-8 | en_US.UTF-8 | =c/girba�� � � ��+
�� � � � ��|�� � ��|� � � � ��|�� � � � � ��|�� � � � � ��| girba=CTc/girba
�testdb� ��| girba | UTF8�� ��| en_US.UTF-8 | en_US.UTF-8 |�
(5 rows)
girba=# \dt
�� � � � List of relations
�Schema | � Name� � | Type� | Owner�
--------+-----------+-------+-------
�public | testtable | table | girba
(1 row)
On 21 Feb 2014, at 06:55, Tudor Girba <tudor@tudorgirba.com> wrote:
> Hi,
>
> I am trying to get the Postgres support to work on Mac, but I have difficulties and I would need a bit of help.
>
> Here is what I do:
>
> 1. Install Postgres from http://postgresapp.com
>
> 2. Open the psql console and create a test table:
> CREATE TABLE TESTTABLE � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � (
> ID int, � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �TEXT varchar(255)
> );
>
> 3. In Pharo, load PostgresV2:
> Gofer new
> � � � smalltalkhubUser: 'PharoExtras' project: 'PostgresV2';
> � � � configuration;
> � � � load.
> (#ConfigurationOfPostgresV2 asClass project version: '2.0-baseline') load
>
> 4. In a Workspace:
> | conn |
> conn := PGConnection new.
> conn connectionArgs:
> � � � � � � � (PGConnectionArgs
> � � � � � � � � � � � hostname: 'localhost'
> � � � � � � � � � � � portno: 5432
> � � � � � � � � � � � databaseName: 'testdb'
> � � � � � � � � � � � userName: 'girba'
> � � � � � � � � � � � password: '').
> conn startup.
>
> This works fine and the PGResult is good (if I use a wrong user, it tells me that the user does not exist).
>
> 5. However:
>
> conn execute: 'SELECT * FROM TESTTABLE;'
>
> ==> PGErrorResponse(value='ERROR: �relation "testtable" does not exist at character 15
> ')
>
> What am I missing?
>
> Doru
>
> --
> www.tudorgirba.com
>
> "Every thing has its own flow"