Native Postgres

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Native Postgres

Schnopp
I cannot do Glorptests/Phosyden by native postgres connection in Pharo 1.4 on Mac OSX. I get error about external module not found.

Is there an option to use the native postgres connection exclusively?

Thanks (gracias)

Guy

Reply | Threaded
Open this post in threaded view
|

Re: Native Postgres

Mariano Martinez Peck


On Mon, Oct 22, 2012 at 1:38 AM, Schnopp <[hidden email]> wrote:
I cannot do Glorptests/Phosyden by native postgres connection in Pharo 1.4 on Mac OSX. I get error about external module not found.


Hi Guy. There is something that is confusing. On the one hand, your subject says "Native Postgres", but we usually refer to "native" to the Smalltalk driver (not OpenDBXDriver). But then you said you get "external module not found". That comes from FFI searching OpenDBX library, in which case, you are trying to use OpenDBX and not the native driver.

Please, let us know exactly what are you trying to use.
 

Is there an option to use the native postgres connection exclusively?
 
Thanks (gracias)


De nada!
 

--
Mariano
http://marianopeck.wordpress.com

Reply | Threaded
Open this post in threaded view
|

Re: Native Postgres

Schnopp
In reply to this post by Schnopp
Mariano,
On your web page for downloading Glorp it says :

Then, for installing Glorp for OpenDBX just execute:

(((Smalltalk at: #ConfigurationOfGlorpDBX)
perform: #project)
perform: #version: with: #stable)
load

If you want to use the PostgreSQL smalltalk native driver, you can execute instead:

(((Smalltalk at: #ConfigurationOfGlorpDBX)
perform: #project)
perform: #version: with: #stable)
load: 'GlorpPostgresV2Native'


I assumed I could then load Phoseydon and it would work with the native driver.

This may be a bad assumption on my part?


Guy

On Monday, 22 October 2012 12:38:24 UTC+13, Schnopp wrote:
I cannot do Glorptests/Phosyden by native postgres connection in Pharo 1.4 on Mac OSX. I get error about external module not found.

Is there an option to use the native postgres connection exclusively?

Thanks (gracias)

Guy

Reply | Threaded
Open this post in threaded view
|

Re: Native Postgres

Schnopp
In reply to this post by Mariano Martinez Peck
Mariano,
I am interested in using Phoseydon

On 23 October 2012 02:11, Mariano Martinez Peck <[hidden email]> wrote:

>
>
> On Mon, Oct 22, 2012 at 1:38 AM, Schnopp <[hidden email]> wrote:
>>
>> I cannot do Glorptests/Phosyden by native postgres connection in Pharo 1.4
>> on Mac OSX. I get error about external module not found.
>>
>
> Hi Guy. There is something that is confusing. On the one hand, your subject
> says "Native Postgres", but we usually refer to "native" to the Smalltalk
> driver (not OpenDBXDriver). But then you said you get "external module not
> found". That comes from FFI searching OpenDBX library, in which case, you
> are trying to use OpenDBX and not the native driver.
>
> Please, let us know exactly what are you trying to use.
>
>
>> Is there an option to use the native postgres connection exclusively?
>>
>>
>> Thanks (gracias)
>>
>
> De nada!
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
>
Reply | Threaded
Open this post in threaded view
|

Re: Native Postgres

Mariano Martinez Peck
In reply to this post by Schnopp


On Mon, Oct 22, 2012 at 7:28 PM, Schnopp <[hidden email]> wrote:
Mariano,
On your web page for downloading Glorp it says :

Then, for installing Glorp for OpenDBX just execute:

(((Smalltalk at: #ConfigurationOfGlorpDBX)
perform: #project)
perform: #version: with: #stable)
load

If you want to use the PostgreSQL smalltalk native driver, you can execute instead:

(((Smalltalk at: #ConfigurationOfGlorpDBX)
perform: #project)
perform: #version: with: #stable)
load: 'GlorpPostgresV2Native'



Ok, let's go step by step. 
First, you will have a PostgresV2 category for tests. You need to change PGConnection>>buildDefaultConnectionArgs to meet the information of your database. 
So, are tests green?
Once that is green, move to the Glorp world. 
I think you then need to run once the test NativePostgresqlDriverMainBackendTest from GlorpDriverPostgreSQL and then, if you now run the Glorp tests, they should use the native client with PostgreSQL. 
Just to be sure, inspect the class var DefaultDriver of PharoDatabaseAccessor. It should be a NativePostgresDriver. 

 
I assumed I could then load Phoseydon and it would work with the native driver.


The PostgreSQL native driver is not developed by us. It is there since years. The first port of Glorp to Squeak was coupled with this driver so you were not able to use any other driver or database. We have modified this so that now Glorp can use different database drivers. So far, we have an adaptor for the native driver and one for the OpenDBXDriver. Besides this, all the other projects of the DBXTalk suite are developed for the OpenDBXDriver. And so Phoseydon. So, or you have to use OpenDBXDriver, or try to change/adapt Phoseydon so that it uses the native driver instead. 
 
This may be a bad assumption on my part?



Yes, sorry, but it is not your fault. It is not documented enough :(
 
Guy


On Monday, 22 October 2012 12:38:24 UTC+13, Schnopp wrote:
I cannot do Glorptests/Phosyden by native postgres connection in Pharo 1.4 on Mac OSX. I get error about external module not found.

Is there an option to use the native postgres connection exclusively?

Thanks (gracias)

Guy




--
Mariano
http://marianopeck.wordpress.com