[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-smalltalk] ROE and domains-table

From: Stefan Schmiedl
Subject: [Help-smalltalk] ROE and domains-table
Date: Mon, 24 Jan 2011 22:03:00 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv: Gecko/20101207 Thunderbird/3.1.7


I've dabbled around with PostgreSQL, DBI and ROE today. That was fun.
Almost no distracting docs to keep me from wading through the source .-)

I'm now looking at a local dump of the database I'm targeting, which
has a few tables used by exim for handling emails.

s8 gst # psql vmail
psql (8.4.4)
Type "help" for help.

vmail=# \d
             List of relations
 Schema |      Name      |   Type   | Owner
 public | aliases        | table    | root
 public | aliases_id_seq | sequence | root
 public | domains        | table    | root
 public | domains_id_seq | sequence | root
 public | incoming       | view     | root
 public | users          | table    | root
 public | users_id_seq   | sequence | root
 public | vacations      | view     | root
(8 rows)

vmail=# \d domains
                                 Table ""
 Column |          Type          |                      Modifiers
 id     | integer                | not null default 
 name   | character varying(200) |
    "domains_pkey" PRIMARY KEY, btree (id)

vmail=# \q

The test file I'm using to look at this through gst's (release version 3.2.3 on amd64 gentoo) eyes is:

Eval [

        | db users aliases domains incoming vacations |

        PackageLoader fileInPackages: #( 'ROE' 'DBD-PostgreSQL' 'DBI' ).

db := DBI.Connection connect: 'DBI:PostgreSQL:dbname=vmail' user: nil password: nil.

        users := db >> 'users'.
        aliases := db >> 'aliases'.
        domains := db >> 'domains'.
        incoming := db >> 'incoming'.
        vacations := db >> 'vacations'.

{ users. aliases. incoming. vacations. domains } do: [ :each | each inspect ].

        db close.


This file gives the following (slightly edited) output:

Loading package ROE
Loading package DBI
Loading package DBD-PostgreSQL
An instance of DBI.PostgreSQL.PGTable
  name: 'users'
columnsArray: (DBI.PostgreSQL.PGTableColumnInfo(id integer(0) not null) ... DBI.PostgreSQL.PGTableColumnInfo(quota character varying(20)) )
  contents: [ 5 RASimpleTuples ]
An instance of DBI.PostgreSQL.PGTable
  name: 'aliases'
columnsArray: (DBI.PostgreSQL.PGTableColumnInfo(id integer(0) not null) ... DBI.PostgreSQL.PGTableColumnInfo(vacationmsg text(0)) )
  contents: [ 5 RASimpleTuples ]
An instance of DBI.PostgreSQL.PGTable
  name: 'incoming'
columnsArray: (DBI.PostgreSQL.PGTableColumnInfo(alias character varying(200)) ... DBI.PostgreSQL.PGTableColumnInfo(quota character varying(20)) )
  contents: [ 5 RASimpleTuples ]
An instance of DBI.PostgreSQL.PGTable
  name: 'vacations'
columnsArray: (DBI.PostgreSQL.PGTableColumnInfo(alias character varying(200)) ... DBI.PostgreSQL.PGTableColumnInfo(vacationmsg text(0)) )
  contents: [ 5 RASimpleTuples ]

Everything's fine up to this point, both tables and views are reported
as PGTable and contain the expected colums and rows, but the domains table
is giving gst trouble:

An instance of DBI.PostgreSQL.PGTable
  name: 'domains'
  attributes: nil
  connection: a PGConnection
  columns: nil
columnsArray: (DBI.PostgreSQL.PGTableColumnInfo(domain_catalog character varying(0)) DBI.PostgreSQL.PGTableColumnInfo(id integer(0) not null) DBI.PostgreSQL.PGTableColumnInfo(name character varying(200)) DBI.PostgreSQL.PGTableColumnInfo(domain_schema character varying(0)) DBI.PostgreSQL.PGTableColumnInfo(domain_name character varying(0)) DBI.PostgreSQL.PGTableColumnInfo(data_type character varying(0)) DBI.PostgreSQL.PGTableColumnInfo(character_maximum_length integer(0)) DBI.PostgreSQL.PGTableColumnInfo(character_octet_length integer(0)) DBI.PostgreSQL.PGTableColumnInfo(character_set_catalog character varying(0)) DBI.PostgreSQL.PGTableColumnInfo(character_set_schema character varying(0)) DBI.PostgreSQL.PGTableColumnInfo(character_set_name character varying(0)) DBI.PostgreSQL.PGTableColumnInfo(collation_catalog character varying(0)) DBI.PostgreSQL.PGTableColumnInfo(collation_schema character varying(0)) DBI.PostgreSQL.PGTableColumnInfo(collation_name character varying(0)) DBI.PostgreSQL.PGTableColumnInfo(numeric_precision integer(0)) DBI.PostgreSQL.PGTableColumnInfo(numeric_precision_radix integer(0)) DBI.PostgreSQL.PGTableColumnInfo(numeric_scale integer(0)) DBI.PostgreSQL.PGTableColumnInfo(datetime_precision integer(0)) DBI.PostgreSQL.PGTableColumnInfo(interval_type character varying(0)) DBI.PostgreSQL.PGTableColumnInfo(interval_precision character varying(0)) DBI.PostgreSQL.PGTableColumnInfo(domain_default character varying(0)) DBI.PostgreSQL.PGTableColumnInfo(udt_catalog character varying(0)) DBI.PostgreSQL.PGTableColumnInfo(udt_schema character varying(0)) DBI.PostgreSQL.PGTableColumnInfo(udt_name character varying(0)) DBI.PostgreSQL.PGTableColumnInfo(scope_catalog character varying(0)) DBI.PostgreSQL.PGTableColumnInfo(scope_schema character varying(0)) DBI.PostgreSQL.PGTableColumnInfo(scope_name character varying(0)) DBI.PostgreSQL.PGTableColumnInfo(maximum_cardinality integer(0)) DBI.PostgreSQL.PGTableColumnInfo(dtd_identifier character varying(0)) )
  contents: [
Object: PGResultSet new "<0x7f63857479d0>" error: ERROR: column "domain_catalog" does not exist
LINE 1: SELECT "domain_catalog" AS c1, "id" AS c2, "name" AS c3, "do...

Error(Exception)>>signal (
Error(Exception)>>signal: (
DBI.PostgreSQL.PGResultSet(Object)>>error: (
[] in DBI.PostgreSQL.PGResultSet>>checkStatusForSelect (
False>>ifFalse: (
DBI.PostgreSQL.PGResultSet>>checkStatusForSelect ( DBI.PostgreSQL.PGConnection>>select: ( DBI.PostgreSQL.PGTable(DBI.Table)>>basicQuery: ( [] in DBI.PostgreSQL.PGTable(ROE.RASQLRelation)>>query: ( [] in DBI.PostgreSQL.PGTable(ROE.RASQLRelation)>>logging:do: (
Time class>>millisecondsToRun: (
DBI.PostgreSQL.PGTable(ROE.RASQLRelation)>>logging:do: ( DBI.PostgreSQL.PGTable(ROE.RASQLRelation)>>query: ( DBI.PostgreSQL.PGTable(ROE.RASQLRelation)>>for:do: ( DBI.PostgreSQL.PGTable(ROE.RARelation)>>do: (
DBI.PostgreSQL.PGTable(Collection)>>examineOn: (
DBI.PostgreSQL.PGTable(Object)>>inspect (
optimized [] in UndefinedObject>>executeStatements (
Array(SequenceableCollection)>>do: (
UndefinedObject>>executeStatements (

Looks like it's somehow getting one of postgresql's system tables instead of my

Am I missing something here?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]