PostgreSQL and Pharo 6

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

PostgreSQL and Pharo 6

kilon.alios
Hey guys , I play with PostgreSQL and I really like it, sorry Esteban :D

I am using Python for it but I would like to give access also to Pharo to my database. I was informed that Garage has a driver for PostgreSQL , is there any other candidate ? Any advice ? 
Reply | Threaded
Open this post in threaded view
|

Re: PostgreSQL and Pharo 6

Sven Van Caekenberghe-2

> On 16 Apr 2017, at 10:36, Dimitris Chloupis <[hidden email]> wrote:
>
> Hey guys , I play with PostgreSQL and I really like it, sorry Esteban :D
>
> I am using Python for it but I would like to give access also to Pharo to my database. I was informed that Garage has a driver for PostgreSQL , is there any other candidate ? Any advice ?

There are basically just two drivers: the trusted V2 driver which is using the traditional ASCII PostgreSQL protocol and the newer V3 driver which is using the binary PostgreSQL protocol. That last one might be a bit less supported by higher level packages, while the former has been around forever.

These drivers are pretty low level.

If you want higher level access, there is of course Glorp, a very good OO-RDBMS mapper.

For a short intro, you could read the following article:

https://medium.com/concerning-pharo/reddit-st-in-10-cool-pharo-classes-1b5327ca0740

Sven
Reply | Threaded
Open this post in threaded view
|

Re: PostgreSQL and Pharo 6

kilon.alios
Thanks Sven, as always top quality blog post
On Sun, 16 Apr 2017 at 12:04, Sven Van Caekenberghe <[hidden email]> wrote:

> On 16 Apr 2017, at 10:36, Dimitris Chloupis <[hidden email]> wrote:
>
> Hey guys , I play with PostgreSQL and I really like it, sorry Esteban :D
>
> I am using Python for it but I would like to give access also to Pharo to my database. I was informed that Garage has a driver for PostgreSQL , is there any other candidate ? Any advice ?

There are basically just two drivers: the trusted V2 driver which is using the traditional ASCII PostgreSQL protocol and the newer V3 driver which is using the binary PostgreSQL protocol. That last one might be a bit less supported by higher level packages, while the former has been around forever.

These drivers are pretty low level.

If you want higher level access, there is of course Glorp, a very good OO-RDBMS mapper.

For a short intro, you could read the following article:

https://medium.com/concerning-pharo/reddit-st-in-10-cool-pharo-classes-1b5327ca0740

Sven
Reply | Threaded
Open this post in threaded view
|

Re: PostgreSQL and Pharo 6

Pharo Smalltalk Users mailing list
In reply to this post by kilon.alios
ODBC worked fine as well if you don't need native driver access
 
-----------------
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)



From: Dimitris Chloupis <[hidden email]>
To: Any question about pharo is welcome <[hidden email]>
Sent: Sunday, April 16, 2017 4:37 AM
Subject: [Pharo-users] PostgreSQL and Pharo 6

Hey guys , I play with PostgreSQL and I really like it, sorry Esteban :D

I am using Python for it but I would like to give access also to Pharo to my database. I was informed that Garage has a driver for PostgreSQL , is there any other candidate ? Any advice ? 


Reply | Threaded
Open this post in threaded view
|

Re: PostgreSQL and Pharo 6

kilon.alios
thank you Benoit 

On Mon, Apr 17, 2017 at 4:23 AM Benoit St-Jean via Pharo-users <[hidden email]> wrote:
ODBC worked fine as well if you don't need native driver access
 
-----------------
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)



From: Dimitris Chloupis <[hidden email]>
To: Any question about pharo is welcome <[hidden email]>
Sent: Sunday, April 16, 2017 4:37 AM
Subject: [Pharo-users] PostgreSQL and Pharo 6

Hey guys , I play with PostgreSQL and I really like it, sorry Esteban :D

I am using Python for it but I would like to give access also to Pharo to my database. I was informed that Garage has a driver for PostgreSQL , is there any other candidate ? Any advice ? 


Reply | Threaded
Open this post in threaded view
|

Re: PostgreSQL and Pharo 6

kilon.alios
Installing from Catalog Browser fails

I installed it via the the website instructions, it installs fine

But if I use it this way 

conn := GAConnection new.
ca := GAConnectionArgs hostname: 'ec2-**-***-***-185.eu-west-1.compute.amazonaws.com
portno: '****'
databaseName:'*******'  
userName: '*****'  
password:''***'.
conn connectionArgs: ca.
conn execute: 'select * from search_terms'.

it fails with no connection, is there anything else i need to do ?
is there a guide for how to use this ? 



On Mon, Apr 17, 2017 at 7:30 PM Dimitris Chloupis <[hidden email]> wrote:
thank you Benoit 

On Mon, Apr 17, 2017 at 4:23 AM Benoit St-Jean via Pharo-users <[hidden email]> wrote:
ODBC worked fine as well if you don't need native driver access
 
-----------------
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)



From: Dimitris Chloupis <[hidden email]>
To: Any question about pharo is welcome <[hidden email]>
Sent: Sunday, April 16, 2017 4:37 AM
Subject: [Pharo-users] PostgreSQL and Pharo 6

Hey guys , I play with PostgreSQL and I really like it, sorry Esteban :D

I am using Python for it but I would like to give access also to Pharo to my database. I was informed that Garage has a driver for PostgreSQL , is there any other candidate ? Any advice ? 


Reply | Threaded
Open this post in threaded view
|

Re: PostgreSQL and Pharo 6

Pharo Smalltalk Users mailing list
You have to #connect before executing SQL statements!

Something like (in your code):

conn connect.
 
-----------------
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)



From: Dimitris Chloupis <[hidden email]>
To: Benoit St-Jean <[hidden email]>; Any question about pharo is welcome <[hidden email]>
Sent: Monday, April 17, 2017 3:54 PM
Subject: Re: [Pharo-users] PostgreSQL and Pharo 6

Installing from Catalog Browser fails

I installed it via the the website instructions, it installs fine

But if I use it this way 

conn := GAConnection new.
ca := GAConnectionArgs hostname: 'ec2-**-***-***-185.eu-west-1.compute.amazonaws.com
portno: '****'
databaseName:'*******'  
userName: '*****'  
password:''***'.
conn connectionArgs: ca.
conn execute: 'select * from search_terms'.

it fails with no connection, is there anything else i need to do ?
is there a guide for how to use this ? 



On Mon, Apr 17, 2017 at 7:30 PM Dimitris Chloupis <[hidden email]> wrote:
thank you Benoit 

On Mon, Apr 17, 2017 at 4:23 AM Benoit St-Jean via Pharo-users <[hidden email]> wrote:
ODBC worked fine as well if you don't need native driver access
 
-----------------
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)



From: Dimitris Chloupis <[hidden email]>
To: Any question about pharo is welcome <[hidden email]>
Sent: Sunday, April 16, 2017 4:37 AM
Subject: [Pharo-users] PostgreSQL and Pharo 6

Hey guys , I play with PostgreSQL and I really like it, sorry Esteban :D

I am using Python for it but I would like to give access also to Pharo to my database. I was informed that Garage has a driver for PostgreSQL , is there any other candidate ? Any advice ? 




Reply | Threaded
Open this post in threaded view
|

Re: PostgreSQL and Pharo 6

kilon.alios
In reply to this post by kilon.alios
no conn connect does not work because GAConnection has no such method. 
#connect exist in GAPostgresDrive but even if I go that route I get error #OptionAt:IfAbsent: was sent to nil . With this code

conn2 := GAPostgresDriver new .
conn2 host: 'ec2-**-***-***-185.eu-west-1.compute.amazonaws.com
port: '****'
database:'*******'  
user: '*****'  
password:''***'.
conn2 connect.

Is there sample code that connects to online databases ?



On Mon, Apr 17, 2017 at 11:18 PM Benoit St-Jean <[hidden email]> wrote:
You have to #connect before executing SQL statements!

Something like (in your code):

conn connect.
 
-----------------
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)



From: Dimitris Chloupis <[hidden email]>
To: Benoit St-Jean <[hidden email]>; Any question about pharo is welcome <[hidden email]>
Sent: Monday, April 17, 2017 3:54 PM
Subject: Re: [Pharo-users] PostgreSQL and Pharo 6

Installing from Catalog Browser fails

I installed it via the the website instructions, it installs fine

But if I use it this way 

conn := GAConnection new.
ca := GAConnectionArgs hostname: 'ec2-**-***-***-185.eu-west-1.compute.amazonaws.com
portno: '****'
databaseName:'*******'  
userName: '*****'  
password:''***'.
conn connectionArgs: ca.
conn execute: 'select * from search_terms'.

it fails with no connection, is there anything else i need to do ?
is there a guide for how to use this ? 



On Mon, Apr 17, 2017 at 7:30 PM Dimitris Chloupis <[hidden email]> wrote:
thank you Benoit 

On Mon, Apr 17, 2017 at 4:23 AM Benoit St-Jean via Pharo-users <[hidden email]> wrote:
ODBC worked fine as well if you don't need native driver access
 
-----------------
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)



From: Dimitris Chloupis <[hidden email]>
To: Any question about pharo is welcome <[hidden email]>
Sent: Sunday, April 16, 2017 4:37 AM
Subject: [Pharo-users] PostgreSQL and Pharo 6

Hey guys , I play with PostgreSQL and I really like it, sorry Esteban :D

I am using Python for it but I would like to give access also to Pharo to my database. I was informed that Garage has a driver for PostgreSQL , is there any other candidate ? Any advice ? 




Reply | Threaded
Open this post in threaded view
|

Re: PostgreSQL and Pharo 6

Pharo Smalltalk Users mailing list
Tell me which exact package you loaded (or even better, the exact to load it) and I will test some code against my PostgreSQL server...
 
-----------------
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)



From: Dimitris Chloupis <[hidden email]>
To: Benoit St-Jean <[hidden email]>; Any question about pharo is welcome <[hidden email]>
Sent: Monday, April 17, 2017 4:55 PM
Subject: Re: [Pharo-users] PostgreSQL and Pharo 6

no conn connect does not work because GAConnection has no such method. 
#connect exist in GAPostgresDrive but even if I go that route I get error #OptionAt:IfAbsent: was sent to nil . With this code

conn2 := GAPostgresDriver new .
conn2 host: 'ec2-**-***-***-185.eu-west-1.compute.amazonaws.com
port: '****'
database:'*******'  
user: '*****'  
password:''***'.
conn2 connect.

Is there sample code that connects to online databases ?



On Mon, Apr 17, 2017 at 11:18 PM Benoit St-Jean <[hidden email]> wrote:
You have to #connect before executing SQL statements!

Something like (in your code):

conn connect.
 
-----------------
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)



From: Dimitris Chloupis <[hidden email]>
To: Benoit St-Jean <[hidden email]>; Any question about pharo is welcome <[hidden email]>
Sent: Monday, April 17, 2017 3:54 PM
Subject: Re: [Pharo-users] PostgreSQL and Pharo 6

Installing from Catalog Browser fails

I installed it via the the website instructions, it installs fine

But if I use it this way 

conn := GAConnection new.
ca := GAConnectionArgs hostname: 'ec2-**-***-***-185.eu-west-1.compute.amazonaws.com
portno: '****'
databaseName:'*******'  
userName: '*****'  
password:''***'.
conn connectionArgs: ca.
conn execute: 'select * from search_terms'.

it fails with no connection, is there anything else i need to do ?
is there a guide for how to use this ? 



On Mon, Apr 17, 2017 at 7:30 PM Dimitris Chloupis <[hidden email]> wrote:
thank you Benoit 

On Mon, Apr 17, 2017 at 4:23 AM Benoit St-Jean via Pharo-users <[hidden email]> wrote:
ODBC worked fine as well if you don't need native driver access
 
-----------------
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)



From: Dimitris Chloupis <[hidden email]>
To: Any question about pharo is welcome <[hidden email]>
Sent: Sunday, April 16, 2017 4:37 AM
Subject: [Pharo-users] PostgreSQL and Pharo 6

Hey guys , I play with PostgreSQL and I really like it, sorry Esteban :D

I am using Python for it but I would like to give access also to Pharo to my database. I was informed that Garage has a driver for PostgreSQL , is there any other candidate ? Any advice ? 






Reply | Threaded
Open this post in threaded view
|

Re: PostgreSQL and Pharo 6

kilon.alios
In reply to this post by kilon.alios
Following the instructions here

http://guillep.github.io/DBXTalk/garage/installation.html

I did

Gofer it
smalltalkhubUser: 'DBXTalk' project: 'Garage';
configurationOf: 'Garage';
load.


(ConfigurationOfGarage project version: '0.5')
load: 'postgresV2'.

And it did install


On Tue, 18 Apr 2017 at 00:02, Benoit St-Jean <[hidden email]> wrote:
Tell me which exact package you loaded (or even better, the exact to load it) and I will test some code against my PostgreSQL server...

 
-----------------
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)



From: Dimitris Chloupis <[hidden email]>
To: Benoit St-Jean <[hidden email]>; Any question about pharo is welcome <[hidden email]>
Sent: Monday, April 17, 2017 4:55 PM

Subject: Re: [Pharo-users] PostgreSQL and Pharo 6

no conn connect does not work because GAConnection has no such method. 
#connect exist in GAPostgresDrive but even if I go that route I get error #OptionAt:IfAbsent: was sent to nil . With this code

conn2 := GAPostgresDriver new .
conn2 host: 'ec2-**-***-***-185.eu-west-1.compute.amazonaws.com
port: '****'
database:'*******'  
user: '*****'  
password:''***'.
conn2 connect.

Is there sample code that connects to online databases ?



On Mon, Apr 17, 2017 at 11:18 PM Benoit St-Jean <[hidden email]> wrote:
You have to #connect before executing SQL statements!

Something like (in your code):

conn connect.
 
-----------------
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)



From: Dimitris Chloupis <[hidden email]>
To: Benoit St-Jean <[hidden email]>; Any question about pharo is welcome <[hidden email]>
Sent: Monday, April 17, 2017 3:54 PM
Subject: Re: [Pharo-users] PostgreSQL and Pharo 6

Installing from Catalog Browser fails

I installed it via the the website instructions, it installs fine

But if I use it this way 

conn := GAConnection new.
ca := GAConnectionArgs hostname: 'ec2-**-***-***-185.eu-west-1.compute.amazonaws.com
portno: '****'
databaseName:'*******'  
userName: '*****'  
password:''***'.
conn connectionArgs: ca.
conn execute: 'select * from search_terms'.

it fails with no connection, is there anything else i need to do ?
is there a guide for how to use this ? 



On Mon, Apr 17, 2017 at 7:30 PM Dimitris Chloupis <[hidden email]> wrote:
thank you Benoit 

On Mon, Apr 17, 2017 at 4:23 AM Benoit St-Jean via Pharo-users <[hidden email]> wrote:
ODBC worked fine as well if you don't need native driver access
 
-----------------
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)



From: Dimitris Chloupis <[hidden email]>
To: Any question about pharo is welcome <[hidden email]>
Sent: Sunday, April 16, 2017 4:37 AM
Subject: [Pharo-users] PostgreSQL and Pharo 6

Hey guys , I play with PostgreSQL and I really like it, sorry Esteban :D

I am using Python for it but I would like to give access also to Pharo to my database. I was informed that Garage has a driver for PostgreSQL , is there any other candidate ? Any advice ? 






Reply | Threaded
Open this post in threaded view
|

Re: PostgreSQL and Pharo 6

Pharo Smalltalk Users mailing list
Try this:

| sql conn connectionSpec result  |
sql := 'SELECT * FROM search_terms'.
conn := GAConnection new.
connectionSpec := GAConnectionArgs
                            hostname: 'localhost'
                            portno: 5432
                            databaseName: 'sodbxtest'
                            userName: 'sodbxtest'
                            password: 'sodbxtest'.
conn connectionArgs: connectionSpec.

"Connect to the server"
result := conn startup.
(result errorResponse isKindOf: GAErrorResponse) ifTrue: [ self halt ].

"Execute your SQL stuff"
result := conn execute: sql.
(result errorResponse isKindOf: GAErrorResponse) ifTrue: [ self halt ] ifFalse: [result inspect].

"Disconnect from the server"
conn close.

 
-----------------
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)



From: Dimitris Chloupis <[hidden email]>
To: Benoit St-Jean <[hidden email]>; Any question about pharo is welcome <[hidden email]>
Sent: Monday, April 17, 2017 5:24 PM
Subject: Re: [Pharo-users] PostgreSQL and Pharo 6

Following the instructions here

http://guillep.github.io/DBXTalk/garage/installation.html

I did

Gofer it
smalltalkhubUser: 'DBXTalk' project: 'Garage';
configurationOf: 'Garage';
load.


(ConfigurationOfGarage project version: '0.5')
load: 'postgresV2'.

And it did install


On Tue, 18 Apr 2017 at 00:02, Benoit St-Jean <[hidden email]> wrote:
Tell me which exact package you loaded (or even better, the exact to load it) and I will test some code against my PostgreSQL server...

 
-----------------
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)



From: Dimitris Chloupis <[hidden email]>
To: Benoit St-Jean <[hidden email]>; Any question about pharo is welcome <[hidden email]>
Sent: Monday, April 17, 2017 4:55 PM

Subject: Re: [Pharo-users] PostgreSQL and Pharo 6

no conn connect does not work because GAConnection has no such method. 
#connect exist in GAPostgresDrive but even if I go that route I get error #OptionAt:IfAbsent: was sent to nil . With this code

conn2 := GAPostgresDriver new .
conn2 host: 'ec2-**-***-***-185.eu-west-1.compute.amazonaws.com
port: '****'
database:'*******'  
user: '*****'  
password:''***'.
conn2 connect.

Is there sample code that connects to online databases ?



On Mon, Apr 17, 2017 at 11:18 PM Benoit St-Jean <[hidden email]> wrote:
You have to #connect before executing SQL statements!

Something like (in your code):

conn connect.
 
-----------------
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)



From: Dimitris Chloupis <[hidden email]>
To: Benoit St-Jean <[hidden email]>; Any question about pharo is welcome <[hidden email]>
Sent: Monday, April 17, 2017 3:54 PM
Subject: Re: [Pharo-users] PostgreSQL and Pharo 6

Installing from Catalog Browser fails

I installed it via the the website instructions, it installs fine

But if I use it this way 

conn := GAConnection new.
ca := GAConnectionArgs hostname: 'ec2-**-***-***-185.eu-west-1.compute.amazonaws.com
portno: '****'
databaseName:'*******'  
userName: '*****'  
password:''***'.
conn connectionArgs: ca.
conn execute: 'select * from search_terms'.

it fails with no connection, is there anything else i need to do ?
is there a guide for how to use this ? 



On Mon, Apr 17, 2017 at 7:30 PM Dimitris Chloupis <[hidden email]> wrote:
thank you Benoit 

On Mon, Apr 17, 2017 at 4:23 AM Benoit St-Jean via Pharo-users <[hidden email]> wrote:
ODBC worked fine as well if you don't need native driver access
 
-----------------
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)



From: Dimitris Chloupis <[hidden email]>
To: Any question about pharo is welcome <[hidden email]>
Sent: Sunday, April 16, 2017 4:37 AM
Subject: [Pharo-users] PostgreSQL and Pharo 6

Hey guys , I play with PostgreSQL and I really like it, sorry Esteban :D

I am using Python for it but I would like to give access also to Pharo to my database. I was informed that Garage has a driver for PostgreSQL , is there any other candidate ? Any advice ? 








Reply | Threaded
Open this post in threaded view
|

Re: PostgreSQL and Pharo 6

kilon.alios
In reply to this post by kilon.alios
I adjusted it for my database and gives me error

EFATAL:  no pg_hba.conf entry for host "", user "", database "", SSL off

any way to resolved this ?

On Tue, Apr 18, 2017 at 1:24 AM Benoit St-Jean <[hidden email]> wrote:
Try this:

| sql conn connectionSpec result  |
sql := 'SELECT * FROM search_terms'.
conn := GAConnection new.
connectionSpec := GAConnectionArgs
                            hostname: 'localhost'
                            portno: 5432
                            databaseName: 'sodbxtest'
                            userName: 'sodbxtest'
                            password: 'sodbxtest'.
conn connectionArgs: connectionSpec.

"Connect to the server"
result := conn startup.
(result errorResponse isKindOf: GAErrorResponse) ifTrue: [ self halt ].

"Execute your SQL stuff"
result := conn execute: sql.
(result errorResponse isKindOf: GAErrorResponse) ifTrue: [ self halt ] ifFalse: [result inspect].

"Disconnect from the server"
conn close.

 
-----------------
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)



From: Dimitris Chloupis <[hidden email]>
To: Benoit St-Jean <[hidden email]>; Any question about pharo is welcome <[hidden email]>
Sent: Monday, April 17, 2017 5:24 PM

Subject: Re: [Pharo-users] PostgreSQL and Pharo 6

Following the instructions here

http://guillep.github.io/DBXTalk/garage/installation.html

I did

Gofer it
smalltalkhubUser: 'DBXTalk' project: 'Garage';
configurationOf: 'Garage';
load.


(ConfigurationOfGarage project version: '0.5')
load: 'postgresV2'.

And it did install


On Tue, 18 Apr 2017 at 00:02, Benoit St-Jean <[hidden email]> wrote:
Tell me which exact package you loaded (or even better, the exact to load it) and I will test some code against my PostgreSQL server...

 
-----------------
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)



From: Dimitris Chloupis <[hidden email]>
To: Benoit St-Jean <[hidden email]>; Any question about pharo is welcome <[hidden email]>
Sent: Monday, April 17, 2017 4:55 PM

Subject: Re: [Pharo-users] PostgreSQL and Pharo 6

no conn connect does not work because GAConnection has no such method. 
#connect exist in GAPostgresDrive but even if I go that route I get error #OptionAt:IfAbsent: was sent to nil . With this code

conn2 := GAPostgresDriver new .
conn2 host: 'ec2-**-***-***-185.eu-west-1.compute.amazonaws.com
port: '****'
database:'*******'  
user: '*****'  
password:''***'.
conn2 connect.

Is there sample code that connects to online databases ?



On Mon, Apr 17, 2017 at 11:18 PM Benoit St-Jean <[hidden email]> wrote:
You have to #connect before executing SQL statements!

Something like (in your code):

conn connect.
 
-----------------
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)



From: Dimitris Chloupis <[hidden email]>
To: Benoit St-Jean <[hidden email]>; Any question about pharo is welcome <[hidden email]>
Sent: Monday, April 17, 2017 3:54 PM
Subject: Re: [Pharo-users] PostgreSQL and Pharo 6

Installing from Catalog Browser fails

I installed it via the the website instructions, it installs fine

But if I use it this way 

conn := GAConnection new.
ca := GAConnectionArgs hostname: 'ec2-**-***-***-185.eu-west-1.compute.amazonaws.com
portno: '****'
databaseName:'*******'  
userName: '*****'  
password:''***'.
conn connectionArgs: ca.
conn execute: 'select * from search_terms'.

it fails with no connection, is there anything else i need to do ?
is there a guide for how to use this ? 



On Mon, Apr 17, 2017 at 7:30 PM Dimitris Chloupis <[hidden email]> wrote:
thank you Benoit 

On Mon, Apr 17, 2017 at 4:23 AM Benoit St-Jean via Pharo-users <[hidden email]> wrote:
ODBC worked fine as well if you don't need native driver access
 
-----------------
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)



From: Dimitris Chloupis <[hidden email]>
To: Any question about pharo is welcome <[hidden email]>
Sent: Sunday, April 16, 2017 4:37 AM
Subject: [Pharo-users] PostgreSQL and Pharo 6

Hey guys , I play with PostgreSQL and I really like it, sorry Esteban :D

I am using Python for it but I would like to give access also to Pharo to my database. I was informed that Garage has a driver for PostgreSQL , is there any other candidate ? Any advice ? 








Reply | Threaded
Open this post in threaded view
|

Re: PostgreSQL and Pharo 6

kilon.alios
After some investigation in Heroku documentation, the database expects a SSL connection but it seems the driver does not use SSL , any way to force Garage to use SSL ?
On Tue, 18 Apr 2017 at 10:07, Dimitris Chloupis <[hidden email]> wrote:
I adjusted it for my database and gives me error

EFATAL:  no pg_hba.conf entry for host "", user "", database "", SSL off

any way to resolved this ?

On Tue, Apr 18, 2017 at 1:24 AM Benoit St-Jean <[hidden email]> wrote:
Try this:

| sql conn connectionSpec result  |
sql := 'SELECT * FROM search_terms'.
conn := GAConnection new.
connectionSpec := GAConnectionArgs
                            hostname: 'localhost'
                            portno: 5432
                            databaseName: 'sodbxtest'
                            userName: 'sodbxtest'
                            password: 'sodbxtest'.
conn connectionArgs: connectionSpec.

"Connect to the server"
result := conn startup.
(result errorResponse isKindOf: GAErrorResponse) ifTrue: [ self halt ].

"Execute your SQL stuff"
result := conn execute: sql.
(result errorResponse isKindOf: GAErrorResponse) ifTrue: [ self halt ] ifFalse: [result inspect].

"Disconnect from the server"
conn close.

 
-----------------
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)



From: Dimitris Chloupis <[hidden email]>
To: Benoit St-Jean <[hidden email]>; Any question about pharo is welcome <[hidden email]>
Sent: Monday, April 17, 2017 5:24 PM

Subject: Re: [Pharo-users] PostgreSQL and Pharo 6

Following the instructions here

http://guillep.github.io/DBXTalk/garage/installation.html

I did

Gofer it
smalltalkhubUser: 'DBXTalk' project: 'Garage';
configurationOf: 'Garage';
load.


(ConfigurationOfGarage project version: '0.5')
load: 'postgresV2'.

And it did install


On Tue, 18 Apr 2017 at 00:02, Benoit St-Jean <[hidden email]> wrote:
Tell me which exact package you loaded (or even better, the exact to load it) and I will test some code against my PostgreSQL server...

 
-----------------
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)



From: Dimitris Chloupis <[hidden email]>
To: Benoit St-Jean <[hidden email]>; Any question about pharo is welcome <[hidden email]>
Sent: Monday, April 17, 2017 4:55 PM

Subject: Re: [Pharo-users] PostgreSQL and Pharo 6

no conn connect does not work because GAConnection has no such method. 
#connect exist in GAPostgresDrive but even if I go that route I get error #OptionAt:IfAbsent: was sent to nil . With this code

conn2 := GAPostgresDriver new .
conn2 host: 'ec2-**-***-***-185.eu-west-1.compute.amazonaws.com
port: '****'
database:'*******'  
user: '*****'  
password:''***'.
conn2 connect.

Is there sample code that connects to online databases ?



On Mon, Apr 17, 2017 at 11:18 PM Benoit St-Jean <[hidden email]> wrote:
You have to #connect before executing SQL statements!

Something like (in your code):

conn connect.
 
-----------------
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)



From: Dimitris Chloupis <[hidden email]>
To: Benoit St-Jean <[hidden email]>; Any question about pharo is welcome <[hidden email]>
Sent: Monday, April 17, 2017 3:54 PM
Subject: Re: [Pharo-users] PostgreSQL and Pharo 6

Installing from Catalog Browser fails

I installed it via the the website instructions, it installs fine

But if I use it this way 

conn := GAConnection new.
ca := GAConnectionArgs hostname: 'ec2-**-***-***-185.eu-west-1.compute.amazonaws.com
portno: '****'
databaseName:'*******'  
userName: '*****'  
password:''***'.
conn connectionArgs: ca.
conn execute: 'select * from search_terms'.

it fails with no connection, is there anything else i need to do ?
is there a guide for how to use this ? 



On Mon, Apr 17, 2017 at 7:30 PM Dimitris Chloupis <[hidden email]> wrote:
thank you Benoit 

On Mon, Apr 17, 2017 at 4:23 AM Benoit St-Jean via Pharo-users <[hidden email]> wrote:
ODBC worked fine as well if you don't need native driver access
 
-----------------
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)



From: Dimitris Chloupis <[hidden email]>
To: Any question about pharo is welcome <[hidden email]>
Sent: Sunday, April 16, 2017 4:37 AM
Subject: [Pharo-users] PostgreSQL and Pharo 6

Hey guys , I play with PostgreSQL and I really like it, sorry Esteban :D

I am using Python for it but I would like to give access also to Pharo to my database. I was informed that Garage has a driver for PostgreSQL , is there any other candidate ? Any advice ? 








Reply | Threaded
Open this post in threaded view
|

Re: PostgreSQL and Pharo 6

Esteban A. Maringolo
Not that I'm aware of.

You can create a ssh tunnel that ciphers the data between your host
and the remote server, but you'd need a ssh daemon running in the
server host.

Regards,

Esteban A. Maringolo


2017-04-18 5:09 GMT-03:00 Dimitris Chloupis <[hidden email]>:

> After some investigation in Heroku documentation, the database expects a SSL
> connection but it seems the driver does not use SSL , any way to force
> Garage to use SSL ?
>
> On Tue, 18 Apr 2017 at 10:07, Dimitris Chloupis <[hidden email]>
> wrote:
>>
>> I adjusted it for my database and gives me error
>>
>> EFATAL:  no pg_hba.conf entry for host "", user "", database "", SSL off
>>
>> any way to resolved this ?
>>
>> On Tue, Apr 18, 2017 at 1:24 AM Benoit St-Jean <[hidden email]> wrote:
>>>
>>> Try this:
>>>
>>> | sql conn connectionSpec result  |
>>> sql := 'SELECT * FROM search_terms'.
>>> conn := GAConnection new.
>>> connectionSpec := GAConnectionArgs
>>>                             hostname: 'localhost'
>>>                             portno: 5432
>>>                             databaseName: 'sodbxtest'
>>>                             userName: 'sodbxtest'
>>>                             password: 'sodbxtest'.
>>> conn connectionArgs: connectionSpec.
>>>
>>> "Connect to the server"
>>> result := conn startup.
>>> (result errorResponse isKindOf: GAErrorResponse) ifTrue: [ self halt ].
>>>
>>> "Execute your SQL stuff"
>>> result := conn execute: sql.
>>> (result errorResponse isKindOf: GAErrorResponse) ifTrue: [ self halt ]
>>> ifFalse: [result inspect].
>>>
>>> "Disconnect from the server"
>>> conn close.
>>>
>>>
>>> -----------------
>>> Benoît St-Jean
>>> Yahoo! Messenger: bstjean
>>> Twitter: @BenLeChialeux
>>> Pinterest: benoitstjean
>>> Instagram: Chef_Benito
>>> IRC: lamneth
>>> Blogue: endormitoire.wordpress.com
>>> "A standpoint is an intellectual horizon of radius zero".  (A. Einstein)
>>>
>>>
>>> ________________________________
>>> From: Dimitris Chloupis <[hidden email]>
>>> To: Benoit St-Jean <[hidden email]>; Any question about pharo is
>>> welcome <[hidden email]>
>>> Sent: Monday, April 17, 2017 5:24 PM
>>>
>>> Subject: Re: [Pharo-users] PostgreSQL and Pharo 6
>>>
>>> Following the instructions here
>>>
>>> http://guillep.github.io/DBXTalk/garage/installation.html
>>>
>>> I did
>>>
>>> Gofer it
>>> smalltalkhubUser: 'DBXTalk' project: 'Garage';
>>> configurationOf: 'Garage';
>>> load.
>>>
>>>
>>> (ConfigurationOfGarage project version: '0.5')
>>> load: 'postgresV2'.
>>>
>>> And it did install
>>>
>>>
>>> On Tue, 18 Apr 2017 at 00:02, Benoit St-Jean <[hidden email]> wrote:
>>>
>>> Tell me which exact package you loaded (or even better, the exact to load
>>> it) and I will test some code against my PostgreSQL server...
>>>
>>>
>>> -----------------
>>> Benoît St-Jean
>>> Yahoo! Messenger: bstjean
>>> Twitter: @BenLeChialeux
>>> Pinterest: benoitstjean
>>> Instagram: Chef_Benito
>>> IRC: lamneth
>>> Blogue: endormitoire.wordpress.com
>>> "A standpoint is an intellectual horizon of radius zero".  (A. Einstein)
>>>
>>>
>>> ________________________________
>>> From: Dimitris Chloupis <[hidden email]>
>>> To: Benoit St-Jean <[hidden email]>; Any question about pharo is
>>> welcome <[hidden email]>
>>> Sent: Monday, April 17, 2017 4:55 PM
>>>
>>> Subject: Re: [Pharo-users] PostgreSQL and Pharo 6
>>>
>>> no conn connect does not work because GAConnection has no such method.
>>> #connect exist in GAPostgresDrive but even if I go that route I get error
>>> #OptionAt:IfAbsent: was sent to nil . With this code
>>>
>>> conn2 := GAPostgresDriver new .
>>> conn2 host: 'ec2-**-***-***-185.eu-west-1.compute.amazonaws.com'
>>> port: '****'
>>> database:'*******'
>>> user: '*****'
>>> password:''***'.
>>> conn2 connect.
>>>
>>> Is there sample code that connects to online databases ?
>>>
>>>
>>>
>>> On Mon, Apr 17, 2017 at 11:18 PM Benoit St-Jean <[hidden email]>
>>> wrote:
>>>
>>> You have to #connect before executing SQL statements!
>>>
>>> Something like (in your code):
>>>
>>> conn connect.
>>>
>>> -----------------
>>> Benoît St-Jean
>>> Yahoo! Messenger: bstjean
>>> Twitter: @BenLeChialeux
>>> Pinterest: benoitstjean
>>> Instagram: Chef_Benito
>>> IRC: lamneth
>>> Blogue: endormitoire.wordpress.com
>>> "A standpoint is an intellectual horizon of radius zero".  (A. Einstein)
>>>
>>>
>>> ________________________________
>>> From: Dimitris Chloupis <[hidden email]>
>>> To: Benoit St-Jean <[hidden email]>; Any question about pharo is
>>> welcome <[hidden email]>
>>> Sent: Monday, April 17, 2017 3:54 PM
>>> Subject: Re: [Pharo-users] PostgreSQL and Pharo 6
>>>
>>> Installing from Catalog Browser fails
>>>
>>> I installed it via the the website instructions, it installs fine
>>>
>>> But if I use it this way
>>>
>>> conn := GAConnection new.
>>> ca := GAConnectionArgs hostname:
>>> 'ec2-**-***-***-185.eu-west-1.compute.amazonaws.com'
>>> portno: '****'
>>> databaseName:'*******'
>>> userName: '*****'
>>> password:''***'.
>>> conn connectionArgs: ca.
>>> conn execute: 'select * from search_terms'.
>>>
>>> it fails with no connection, is there anything else i need to do ?
>>> is there a guide for how to use this ?
>>>
>>>
>>>
>>> On Mon, Apr 17, 2017 at 7:30 PM Dimitris Chloupis <[hidden email]>
>>> wrote:
>>>
>>> thank you Benoit
>>>
>>> On Mon, Apr 17, 2017 at 4:23 AM Benoit St-Jean via Pharo-users
>>> <[hidden email]> wrote:
>>>
>>> ODBC worked fine as well if you don't need native driver access
>>>
>>> -----------------
>>> Benoît St-Jean
>>> Yahoo! Messenger: bstjean
>>> Twitter: @BenLeChialeux
>>> Pinterest: benoitstjean
>>> Instagram: Chef_Benito
>>> IRC: lamneth
>>> Blogue: endormitoire.wordpress.com
>>> "A standpoint is an intellectual horizon of radius zero".  (A. Einstein)
>>>
>>>
>>> ________________________________
>>> From: Dimitris Chloupis <[hidden email]>
>>> To: Any question about pharo is welcome <[hidden email]>
>>> Sent: Sunday, April 16, 2017 4:37 AM
>>> Subject: [Pharo-users] PostgreSQL and Pharo 6
>>>
>>> Hey guys , I play with PostgreSQL and I really like it, sorry Esteban :D
>>>
>>> I am using Python for it but I would like to give access also to Pharo to
>>> my database. I was informed that Garage has a driver for PostgreSQL , is
>>> there any other candidate ? Any advice ?
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>

Reply | Threaded
Open this post in threaded view
|

Re: PostgreSQL and Pharo 6

kilon.alios
Looks like I will have to make my own PostgreSQL API . Nice excuse to test my UFFI skills once more :)
On Tue, 18 Apr 2017 at 16:17, Esteban A. Maringolo <[hidden email]> wrote:
Not that I'm aware of.

You can create a ssh tunnel that ciphers the data between your host
and the remote server, but you'd need a ssh daemon running in the
server host.

Regards,

Esteban A. Maringolo


2017-04-18 5:09 GMT-03:00 Dimitris Chloupis <[hidden email]>:
> After some investigation in Heroku documentation, the database expects a SSL
> connection but it seems the driver does not use SSL , any way to force
> Garage to use SSL ?
>
> On Tue, 18 Apr 2017 at 10:07, Dimitris Chloupis <[hidden email]>
> wrote:
>>
>> I adjusted it for my database and gives me error
>>
>> EFATAL:  no pg_hba.conf entry for host "", user "", database "", SSL off
>>
>> any way to resolved this ?
>>
>> On Tue, Apr 18, 2017 at 1:24 AM Benoit St-Jean <[hidden email]> wrote:
>>>
>>> Try this:
>>>
>>> | sql conn connectionSpec result  |
>>> sql := 'SELECT * FROM search_terms'.
>>> conn := GAConnection new.
>>> connectionSpec := GAConnectionArgs
>>>                             hostname: 'localhost'
>>>                             portno: 5432
>>>                             databaseName: 'sodbxtest'
>>>                             userName: 'sodbxtest'
>>>                             password: 'sodbxtest'.
>>> conn connectionArgs: connectionSpec.
>>>
>>> "Connect to the server"
>>> result := conn startup.
>>> (result errorResponse isKindOf: GAErrorResponse) ifTrue: [ self halt ].
>>>
>>> "Execute your SQL stuff"
>>> result := conn execute: sql.
>>> (result errorResponse isKindOf: GAErrorResponse) ifTrue: [ self halt ]
>>> ifFalse: [result inspect].
>>>
>>> "Disconnect from the server"
>>> conn close.
>>>
>>>
>>> -----------------
>>> Benoît St-Jean
>>> Yahoo! Messenger: bstjean
>>> Twitter: @BenLeChialeux
>>> Pinterest: benoitstjean
>>> Instagram: Chef_Benito
>>> IRC: lamneth
>>> Blogue: endormitoire.wordpress.com
>>> "A standpoint is an intellectual horizon of radius zero".  (A. Einstein)
>>>
>>>
>>> ________________________________
>>> From: Dimitris Chloupis <[hidden email]>
>>> To: Benoit St-Jean <[hidden email]>; Any question about pharo is
>>> welcome <[hidden email]>
>>> Sent: Monday, April 17, 2017 5:24 PM
>>>
>>> Subject: Re: [Pharo-users] PostgreSQL and Pharo 6
>>>
>>> Following the instructions here
>>>
>>> http://guillep.github.io/DBXTalk/garage/installation.html
>>>
>>> I did
>>>
>>> Gofer it
>>> smalltalkhubUser: 'DBXTalk' project: 'Garage';
>>> configurationOf: 'Garage';
>>> load.
>>>
>>>
>>> (ConfigurationOfGarage project version: '0.5')
>>> load: 'postgresV2'.
>>>
>>> And it did install
>>>
>>>
>>> On Tue, 18 Apr 2017 at 00:02, Benoit St-Jean <[hidden email]> wrote:
>>>
>>> Tell me which exact package you loaded (or even better, the exact to load
>>> it) and I will test some code against my PostgreSQL server...
>>>
>>>
>>> -----------------
>>> Benoît St-Jean
>>> Yahoo! Messenger: bstjean
>>> Twitter: @BenLeChialeux
>>> Pinterest: benoitstjean
>>> Instagram: Chef_Benito
>>> IRC: lamneth
>>> Blogue: endormitoire.wordpress.com
>>> "A standpoint is an intellectual horizon of radius zero".  (A. Einstein)
>>>
>>>
>>> ________________________________
>>> From: Dimitris Chloupis <[hidden email]>
>>> To: Benoit St-Jean <[hidden email]>; Any question about pharo is
>>> welcome <[hidden email]>
>>> Sent: Monday, April 17, 2017 4:55 PM
>>>
>>> Subject: Re: [Pharo-users] PostgreSQL and Pharo 6
>>>
>>> no conn connect does not work because GAConnection has no such method.
>>> #connect exist in GAPostgresDrive but even if I go that route I get error
>>> #OptionAt:IfAbsent: was sent to nil . With this code
>>>
>>> conn2 := GAPostgresDriver new .
>>> conn2 host: 'ec2-**-***-***-185.eu-west-1.compute.amazonaws.com'
>>> port: '****'
>>> database:'*******'
>>> user: '*****'
>>> password:''***'.
>>> conn2 connect.
>>>
>>> Is there sample code that connects to online databases ?
>>>
>>>
>>>
>>> On Mon, Apr 17, 2017 at 11:18 PM Benoit St-Jean <[hidden email]>
>>> wrote:
>>>
>>> You have to #connect before executing SQL statements!
>>>
>>> Something like (in your code):
>>>
>>> conn connect.
>>>
>>> -----------------
>>> Benoît St-Jean
>>> Yahoo! Messenger: bstjean
>>> Twitter: @BenLeChialeux
>>> Pinterest: benoitstjean
>>> Instagram: Chef_Benito
>>> IRC: lamneth
>>> Blogue: endormitoire.wordpress.com
>>> "A standpoint is an intellectual horizon of radius zero".  (A. Einstein)
>>>
>>>
>>> ________________________________
>>> From: Dimitris Chloupis <[hidden email]>
>>> To: Benoit St-Jean <[hidden email]>; Any question about pharo is
>>> welcome <[hidden email]>
>>> Sent: Monday, April 17, 2017 3:54 PM
>>> Subject: Re: [Pharo-users] PostgreSQL and Pharo 6
>>>
>>> Installing from Catalog Browser fails
>>>
>>> I installed it via the the website instructions, it installs fine
>>>
>>> But if I use it this way
>>>
>>> conn := GAConnection new.
>>> ca := GAConnectionArgs hostname:
>>> 'ec2-**-***-***-185.eu-west-1.compute.amazonaws.com'
>>> portno: '****'
>>> databaseName:'*******'
>>> userName: '*****'
>>> password:''***'.
>>> conn connectionArgs: ca.
>>> conn execute: 'select * from search_terms'.
>>>
>>> it fails with no connection, is there anything else i need to do ?
>>> is there a guide for how to use this ?
>>>
>>>
>>>
>>> On Mon, Apr 17, 2017 at 7:30 PM Dimitris Chloupis <[hidden email]>
>>> wrote:
>>>
>>> thank you Benoit
>>>
>>> On Mon, Apr 17, 2017 at 4:23 AM Benoit St-Jean via Pharo-users
>>> <[hidden email]> wrote:
>>>
>>> ODBC worked fine as well if you don't need native driver access
>>>
>>> -----------------
>>> Benoît St-Jean
>>> Yahoo! Messenger: bstjean
>>> Twitter: @BenLeChialeux
>>> Pinterest: benoitstjean
>>> Instagram: Chef_Benito
>>> IRC: lamneth
>>> Blogue: endormitoire.wordpress.com
>>> "A standpoint is an intellectual horizon of radius zero".  (A. Einstein)
>>>
>>>
>>> ________________________________
>>> From: Dimitris Chloupis <[hidden email]>
>>> To: Any question about pharo is welcome <[hidden email]>
>>> Sent: Sunday, April 16, 2017 4:37 AM
>>> Subject: [Pharo-users] PostgreSQL and Pharo 6
>>>
>>> Hey guys , I play with PostgreSQL and I really like it, sorry Esteban :D
>>>
>>> I am using Python for it but I would like to give access also to Pharo to
>>> my database. I was informed that Garage has a driver for PostgreSQL , is
>>> there any other candidate ? Any advice ?
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>

Reply | Threaded
Open this post in threaded view
|

Re: PostgreSQL and Pharo 6

Esteban A. Maringolo
All current PostgreSQL drivers are 100% written in Smalltalk, I
haven't used the V3 version (binary), but the V2 is more than good
enough even for production systems.

Writing a new driver using the libpq shared library might be a fun
project, but a lot of work; maybe it will be more fun adding the
SSL/TLS to the current Smalltalk implementation :)

Regards,

Esteban A. Maringolo


2017-04-18 11:19 GMT-03:00 Dimitris Chloupis <[hidden email]>:

> Looks like I will have to make my own PostgreSQL API . Nice excuse to test
> my UFFI skills once more :)
>
> On Tue, 18 Apr 2017 at 16:17, Esteban A. Maringolo <[hidden email]>
> wrote:
>>
>> Not that I'm aware of.
>>
>> You can create a ssh tunnel that ciphers the data between your host
>> and the remote server, but you'd need a ssh daemon running in the
>> server host.
>>
>> Regards,
>>
>> Esteban A. Maringolo
>>
>>
>> 2017-04-18 5:09 GMT-03:00 Dimitris Chloupis <[hidden email]>:
>> > After some investigation in Heroku documentation, the database expects a
>> > SSL
>> > connection but it seems the driver does not use SSL , any way to force
>> > Garage to use SSL ?
>> >
>> > On Tue, 18 Apr 2017 at 10:07, Dimitris Chloupis <[hidden email]>
>> > wrote:
>> >>
>> >> I adjusted it for my database and gives me error
>> >>
>> >> EFATAL:  no pg_hba.conf entry for host "", user "", database "", SSL
>> >> off
>> >>
>> >> any way to resolved this ?
>> >>
>> >> On Tue, Apr 18, 2017 at 1:24 AM Benoit St-Jean <[hidden email]>
>> >> wrote:
>> >>>
>> >>> Try this:
>> >>>
>> >>> | sql conn connectionSpec result  |
>> >>> sql := 'SELECT * FROM search_terms'.
>> >>> conn := GAConnection new.
>> >>> connectionSpec := GAConnectionArgs
>> >>>                             hostname: 'localhost'
>> >>>                             portno: 5432
>> >>>                             databaseName: 'sodbxtest'
>> >>>                             userName: 'sodbxtest'
>> >>>                             password: 'sodbxtest'.
>> >>> conn connectionArgs: connectionSpec.
>> >>>
>> >>> "Connect to the server"
>> >>> result := conn startup.
>> >>> (result errorResponse isKindOf: GAErrorResponse) ifTrue: [ self halt
>> >>> ].
>> >>>
>> >>> "Execute your SQL stuff"
>> >>> result := conn execute: sql.
>> >>> (result errorResponse isKindOf: GAErrorResponse) ifTrue: [ self halt ]
>> >>> ifFalse: [result inspect].
>> >>>
>> >>> "Disconnect from the server"
>> >>> conn close.
>> >>>
>> >>>
>> >>> -----------------
>> >>> Benoît St-Jean
>> >>> Yahoo! Messenger: bstjean
>> >>> Twitter: @BenLeChialeux
>> >>> Pinterest: benoitstjean
>> >>> Instagram: Chef_Benito
>> >>> IRC: lamneth
>> >>> Blogue: endormitoire.wordpress.com
>> >>> "A standpoint is an intellectual horizon of radius zero".  (A.
>> >>> Einstein)
>> >>>
>> >>>
>> >>> ________________________________
>> >>> From: Dimitris Chloupis <[hidden email]>
>> >>> To: Benoit St-Jean <[hidden email]>; Any question about pharo is
>> >>> welcome <[hidden email]>
>> >>> Sent: Monday, April 17, 2017 5:24 PM
>> >>>
>> >>> Subject: Re: [Pharo-users] PostgreSQL and Pharo 6
>> >>>
>> >>> Following the instructions here
>> >>>
>> >>> http://guillep.github.io/DBXTalk/garage/installation.html
>> >>>
>> >>> I did
>> >>>
>> >>> Gofer it
>> >>> smalltalkhubUser: 'DBXTalk' project: 'Garage';
>> >>> configurationOf: 'Garage';
>> >>> load.
>> >>>
>> >>>
>> >>> (ConfigurationOfGarage project version: '0.5')
>> >>> load: 'postgresV2'.
>> >>>
>> >>> And it did install
>> >>>
>> >>>
>> >>> On Tue, 18 Apr 2017 at 00:02, Benoit St-Jean <[hidden email]>
>> >>> wrote:
>> >>>
>> >>> Tell me which exact package you loaded (or even better, the exact to
>> >>> load
>> >>> it) and I will test some code against my PostgreSQL server...
>> >>>
>> >>>
>> >>> -----------------
>> >>> Benoît St-Jean
>> >>> Yahoo! Messenger: bstjean
>> >>> Twitter: @BenLeChialeux
>> >>> Pinterest: benoitstjean
>> >>> Instagram: Chef_Benito
>> >>> IRC: lamneth
>> >>> Blogue: endormitoire.wordpress.com
>> >>> "A standpoint is an intellectual horizon of radius zero".  (A.
>> >>> Einstein)
>> >>>
>> >>>
>> >>> ________________________________
>> >>> From: Dimitris Chloupis <[hidden email]>
>> >>> To: Benoit St-Jean <[hidden email]>; Any question about pharo is
>> >>> welcome <[hidden email]>
>> >>> Sent: Monday, April 17, 2017 4:55 PM
>> >>>
>> >>> Subject: Re: [Pharo-users] PostgreSQL and Pharo 6
>> >>>
>> >>> no conn connect does not work because GAConnection has no such method.
>> >>> #connect exist in GAPostgresDrive but even if I go that route I get
>> >>> error
>> >>> #OptionAt:IfAbsent: was sent to nil . With this code
>> >>>
>> >>> conn2 := GAPostgresDriver new .
>> >>> conn2 host: 'ec2-**-***-***-185.eu-west-1.compute.amazonaws.com'
>> >>> port: '****'
>> >>> database:'*******'
>> >>> user: '*****'
>> >>> password:''***'.
>> >>> conn2 connect.
>> >>>
>> >>> Is there sample code that connects to online databases ?
>> >>>
>> >>>
>> >>>
>> >>> On Mon, Apr 17, 2017 at 11:18 PM Benoit St-Jean <[hidden email]>
>> >>> wrote:
>> >>>
>> >>> You have to #connect before executing SQL statements!
>> >>>
>> >>> Something like (in your code):
>> >>>
>> >>> conn connect.
>> >>>
>> >>> -----------------
>> >>> Benoît St-Jean
>> >>> Yahoo! Messenger: bstjean
>> >>> Twitter: @BenLeChialeux
>> >>> Pinterest: benoitstjean
>> >>> Instagram: Chef_Benito
>> >>> IRC: lamneth
>> >>> Blogue: endormitoire.wordpress.com
>> >>> "A standpoint is an intellectual horizon of radius zero".  (A.
>> >>> Einstein)
>> >>>
>> >>>
>> >>> ________________________________
>> >>> From: Dimitris Chloupis <[hidden email]>
>> >>> To: Benoit St-Jean <[hidden email]>; Any question about pharo is
>> >>> welcome <[hidden email]>
>> >>> Sent: Monday, April 17, 2017 3:54 PM
>> >>> Subject: Re: [Pharo-users] PostgreSQL and Pharo 6
>> >>>
>> >>> Installing from Catalog Browser fails
>> >>>
>> >>> I installed it via the the website instructions, it installs fine
>> >>>
>> >>> But if I use it this way
>> >>>
>> >>> conn := GAConnection new.
>> >>> ca := GAConnectionArgs hostname:
>> >>> 'ec2-**-***-***-185.eu-west-1.compute.amazonaws.com'
>> >>> portno: '****'
>> >>> databaseName:'*******'
>> >>> userName: '*****'
>> >>> password:''***'.
>> >>> conn connectionArgs: ca.
>> >>> conn execute: 'select * from search_terms'.
>> >>>
>> >>> it fails with no connection, is there anything else i need to do ?
>> >>> is there a guide for how to use this ?
>> >>>
>> >>>
>> >>>
>> >>> On Mon, Apr 17, 2017 at 7:30 PM Dimitris Chloupis
>> >>> <[hidden email]>
>> >>> wrote:
>> >>>
>> >>> thank you Benoit
>> >>>
>> >>> On Mon, Apr 17, 2017 at 4:23 AM Benoit St-Jean via Pharo-users
>> >>> <[hidden email]> wrote:
>> >>>
>> >>> ODBC worked fine as well if you don't need native driver access
>> >>>
>> >>> -----------------
>> >>> Benoît St-Jean
>> >>> Yahoo! Messenger: bstjean
>> >>> Twitter: @BenLeChialeux
>> >>> Pinterest: benoitstjean
>> >>> Instagram: Chef_Benito
>> >>> IRC: lamneth
>> >>> Blogue: endormitoire.wordpress.com
>> >>> "A standpoint is an intellectual horizon of radius zero".  (A.
>> >>> Einstein)
>> >>>
>> >>>
>> >>> ________________________________
>> >>> From: Dimitris Chloupis <[hidden email]>
>> >>> To: Any question about pharo is welcome <[hidden email]>
>> >>> Sent: Sunday, April 16, 2017 4:37 AM
>> >>> Subject: [Pharo-users] PostgreSQL and Pharo 6
>> >>>
>> >>> Hey guys , I play with PostgreSQL and I really like it, sorry Esteban
>> >>> :D
>> >>>
>> >>> I am using Python for it but I would like to give access also to Pharo
>> >>> to
>> >>> my database. I was informed that Garage has a driver for PostgreSQL ,
>> >>> is
>> >>> there any other candidate ? Any advice ?
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: PostgreSQL and Pharo 6

kilon.alios
Sure but most probably I won't do either and abandon the effort. By API I did not mean to wrap the entire thing only a dozen of functions, the bare minimum I want to make this work. Including SSL. Will give a try at some point in the future and if it's easy will do. If not , no big deal.

There is also the possibility of using the Python library for PostgreSQL from inside Pharo via my Python IPC API, Atlas. I just did not want to add Python as dependency for a Pharo library. But for now is the easiest solution .
On Tue, 18 Apr 2017 at 17:51, Esteban A. Maringolo <[hidden email]> wrote:
All current PostgreSQL drivers are 100% written in Smalltalk, I
haven't used the V3 version (binary), but the V2 is more than good
enough even for production systems.

Writing a new driver using the libpq shared library might be a fun
project, but a lot of work; maybe it will be more fun adding the
SSL/TLS to the current Smalltalk implementation :)

Regards,

Esteban A. Maringolo


2017-04-18 11:19 GMT-03:00 Dimitris Chloupis <[hidden email]>:
> Looks like I will have to make my own PostgreSQL API . Nice excuse to test
> my UFFI skills once more :)
>
> On Tue, 18 Apr 2017 at 16:17, Esteban A. Maringolo <[hidden email]>
> wrote:
>>
>> Not that I'm aware of.
>>
>> You can create a ssh tunnel that ciphers the data between your host
>> and the remote server, but you'd need a ssh daemon running in the
>> server host.
>>
>> Regards,
>>
>> Esteban A. Maringolo
>>
>>
>> 2017-04-18 5:09 GMT-03:00 Dimitris Chloupis <[hidden email]>:
>> > After some investigation in Heroku documentation, the database expects a
>> > SSL
>> > connection but it seems the driver does not use SSL , any way to force
>> > Garage to use SSL ?
>> >
>> > On Tue, 18 Apr 2017 at 10:07, Dimitris Chloupis <[hidden email]>
>> > wrote:
>> >>
>> >> I adjusted it for my database and gives me error
>> >>
>> >> EFATAL:  no pg_hba.conf entry for host "", user "", database "", SSL
>> >> off
>> >>
>> >> any way to resolved this ?
>> >>
>> >> On Tue, Apr 18, 2017 at 1:24 AM Benoit St-Jean <[hidden email]>
>> >> wrote:
>> >>>
>> >>> Try this:
>> >>>
>> >>> | sql conn connectionSpec result  |
>> >>> sql := 'SELECT * FROM search_terms'.
>> >>> conn := GAConnection new.
>> >>> connectionSpec := GAConnectionArgs
>> >>>                             hostname: 'localhost'
>> >>>                             portno: 5432
>> >>>                             databaseName: 'sodbxtest'
>> >>>                             userName: 'sodbxtest'
>> >>>                             password: 'sodbxtest'.
>> >>> conn connectionArgs: connectionSpec.
>> >>>
>> >>> "Connect to the server"
>> >>> result := conn startup.
>> >>> (result errorResponse isKindOf: GAErrorResponse) ifTrue: [ self halt
>> >>> ].
>> >>>
>> >>> "Execute your SQL stuff"
>> >>> result := conn execute: sql.
>> >>> (result errorResponse isKindOf: GAErrorResponse) ifTrue: [ self halt ]
>> >>> ifFalse: [result inspect].
>> >>>
>> >>> "Disconnect from the server"
>> >>> conn close.
>> >>>
>> >>>
>> >>> -----------------
>> >>> Benoît St-Jean
>> >>> Yahoo! Messenger: bstjean
>> >>> Twitter: @BenLeChialeux
>> >>> Pinterest: benoitstjean
>> >>> Instagram: Chef_Benito
>> >>> IRC: lamneth
>> >>> Blogue: endormitoire.wordpress.com
>> >>> "A standpoint is an intellectual horizon of radius zero".  (A.
>> >>> Einstein)
>> >>>
>> >>>
>> >>> ________________________________
>> >>> From: Dimitris Chloupis <[hidden email]>
>> >>> To: Benoit St-Jean <[hidden email]>; Any question about pharo is
>> >>> welcome <[hidden email]>
>> >>> Sent: Monday, April 17, 2017 5:24 PM
>> >>>
>> >>> Subject: Re: [Pharo-users] PostgreSQL and Pharo 6
>> >>>
>> >>> Following the instructions here
>> >>>
>> >>> http://guillep.github.io/DBXTalk/garage/installation.html
>> >>>
>> >>> I did
>> >>>
>> >>> Gofer it
>> >>> smalltalkhubUser: 'DBXTalk' project: 'Garage';
>> >>> configurationOf: 'Garage';
>> >>> load.
>> >>>
>> >>>
>> >>> (ConfigurationOfGarage project version: '0.5')
>> >>> load: 'postgresV2'.
>> >>>
>> >>> And it did install
>> >>>
>> >>>
>> >>> On Tue, 18 Apr 2017 at 00:02, Benoit St-Jean <[hidden email]>
>> >>> wrote:
>> >>>
>> >>> Tell me which exact package you loaded (or even better, the exact to
>> >>> load
>> >>> it) and I will test some code against my PostgreSQL server...
>> >>>
>> >>>
>> >>> -----------------
>> >>> Benoît St-Jean
>> >>> Yahoo! Messenger: bstjean
>> >>> Twitter: @BenLeChialeux
>> >>> Pinterest: benoitstjean
>> >>> Instagram: Chef_Benito
>> >>> IRC: lamneth
>> >>> Blogue: endormitoire.wordpress.com
>> >>> "A standpoint is an intellectual horizon of radius zero".  (A.
>> >>> Einstein)
>> >>>
>> >>>
>> >>> ________________________________
>> >>> From: Dimitris Chloupis <[hidden email]>
>> >>> To: Benoit St-Jean <[hidden email]>; Any question about pharo is
>> >>> welcome <[hidden email]>
>> >>> Sent: Monday, April 17, 2017 4:55 PM
>> >>>
>> >>> Subject: Re: [Pharo-users] PostgreSQL and Pharo 6
>> >>>
>> >>> no conn connect does not work because GAConnection has no such method.
>> >>> #connect exist in GAPostgresDrive but even if I go that route I get
>> >>> error
>> >>> #OptionAt:IfAbsent: was sent to nil . With this code
>> >>>
>> >>> conn2 := GAPostgresDriver new .
>> >>> conn2 host: 'ec2-**-***-***-185.eu-west-1.compute.amazonaws.com'
>> >>> port: '****'
>> >>> database:'*******'
>> >>> user: '*****'
>> >>> password:''***'.
>> >>> conn2 connect.
>> >>>
>> >>> Is there sample code that connects to online databases ?
>> >>>
>> >>>
>> >>>
>> >>> On Mon, Apr 17, 2017 at 11:18 PM Benoit St-Jean <[hidden email]>
>> >>> wrote:
>> >>>
>> >>> You have to #connect before executing SQL statements!
>> >>>
>> >>> Something like (in your code):
>> >>>
>> >>> conn connect.
>> >>>
>> >>> -----------------
>> >>> Benoît St-Jean
>> >>> Yahoo! Messenger: bstjean
>> >>> Twitter: @BenLeChialeux
>> >>> Pinterest: benoitstjean
>> >>> Instagram: Chef_Benito
>> >>> IRC: lamneth
>> >>> Blogue: endormitoire.wordpress.com
>> >>> "A standpoint is an intellectual horizon of radius zero".  (A.
>> >>> Einstein)
>> >>>
>> >>>
>> >>> ________________________________
>> >>> From: Dimitris Chloupis <[hidden email]>
>> >>> To: Benoit St-Jean <[hidden email]>; Any question about pharo is
>> >>> welcome <[hidden email]>
>> >>> Sent: Monday, April 17, 2017 3:54 PM
>> >>> Subject: Re: [Pharo-users] PostgreSQL and Pharo 6
>> >>>
>> >>> Installing from Catalog Browser fails
>> >>>
>> >>> I installed it via the the website instructions, it installs fine
>> >>>
>> >>> But if I use it this way
>> >>>
>> >>> conn := GAConnection new.
>> >>> ca := GAConnectionArgs hostname:
>> >>> 'ec2-**-***-***-185.eu-west-1.compute.amazonaws.com'
>> >>> portno: '****'
>> >>> databaseName:'*******'
>> >>> userName: '*****'
>> >>> password:''***'.
>> >>> conn connectionArgs: ca.
>> >>> conn execute: 'select * from search_terms'.
>> >>>
>> >>> it fails with no connection, is there anything else i need to do ?
>> >>> is there a guide for how to use this ?
>> >>>
>> >>>
>> >>>
>> >>> On Mon, Apr 17, 2017 at 7:30 PM Dimitris Chloupis
>> >>> <[hidden email]>
>> >>> wrote:
>> >>>
>> >>> thank you Benoit
>> >>>
>> >>> On Mon, Apr 17, 2017 at 4:23 AM Benoit St-Jean via Pharo-users
>> >>> <[hidden email]> wrote:
>> >>>
>> >>> ODBC worked fine as well if you don't need native driver access
>> >>>
>> >>> -----------------
>> >>> Benoît St-Jean
>> >>> Yahoo! Messenger: bstjean
>> >>> Twitter: @BenLeChialeux
>> >>> Pinterest: benoitstjean
>> >>> Instagram: Chef_Benito
>> >>> IRC: lamneth
>> >>> Blogue: endormitoire.wordpress.com
>> >>> "A standpoint is an intellectual horizon of radius zero".  (A.
>> >>> Einstein)
>> >>>
>> >>>
>> >>> ________________________________
>> >>> From: Dimitris Chloupis <[hidden email]>
>> >>> To: Any question about pharo is welcome <[hidden email]>
>> >>> Sent: Sunday, April 16, 2017 4:37 AM
>> >>> Subject: [Pharo-users] PostgreSQL and Pharo 6
>> >>>
>> >>> Hey guys , I play with PostgreSQL and I really like it, sorry Esteban
>> >>> :D
>> >>>
>> >>> I am using Python for it but I would like to give access also to Pharo
>> >>> to
>> >>> my database. I was informed that Garage has a driver for PostgreSQL ,
>> >>> is
>> >>> there any other candidate ? Any advice ?
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: PostgreSQL and Pharo 6

Pharo Smalltalk Users mailing list
Do you absolutely need SSL or you can connect to this server without it? 

Esteban is right : writing a driver from scratch takes quite some time!  It would be way easier to add SSL support to the existing one.


 
-----------------
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)



From: Dimitris Chloupis <[hidden email]>
To: Any question about pharo is welcome <[hidden email]>
Sent: Tuesday, April 18, 2017 11:02 AM
Subject: Re: [Pharo-users] PostgreSQL and Pharo 6

Sure but most probably I won't do either and abandon the effort. By API I did not mean to wrap the entire thing only a dozen of functions, the bare minimum I want to make this work. Including SSL. Will give a try at some point in the future and if it's easy will do. If not , no big deal.

There is also the possibility of using the Python library for PostgreSQL from inside Pharo via my Python IPC API, Atlas. I just did not want to add Python as dependency for a Pharo library. But for now is the easiest solution .
On Tue, 18 Apr 2017 at 17:51, Esteban A. Maringolo <[hidden email]> wrote:
All current PostgreSQL drivers are 100% written in Smalltalk, I
haven't used the V3 version (binary), but the V2 is more than good
enough even for production systems.

Writing a new driver using the libpq shared library might be a fun
project, but a lot of work; maybe it will be more fun adding the
SSL/TLS to the current Smalltalk implementation :)

Regards,

Esteban A. Maringolo


2017-04-18 11:19 GMT-03:00 Dimitris Chloupis <[hidden email]>:
> Looks like I will have to make my own PostgreSQL API . Nice excuse to test
> my UFFI skills once more :)
>
> On Tue, 18 Apr 2017 at 16:17, Esteban A. Maringolo <[hidden email]>
> wrote:
>>
>> Not that I'm aware of.
>>
>> You can create a ssh tunnel that ciphers the data between your host
>> and the remote server, but you'd need a ssh daemon running in the
>> server host.
>>
>> Regards,
>>
>> Esteban A. Maringolo
>>
>>
>> 2017-04-18 5:09 GMT-03:00 Dimitris Chloupis <[hidden email]>:
>> > After some investigation in Heroku documentation, the database expects a
>> > SSL
>> > connection but it seems the driver does not use SSL , any way to force
>> > Garage to use SSL ?
>> >
>> > On Tue, 18 Apr 2017 at 10:07, Dimitris Chloupis <[hidden email]>
>> > wrote:
>> >>
>> >> I adjusted it for my database and gives me error
>> >>
>> >> EFATAL:  no pg_hba.conf entry for host "", user "", database "", SSL
>> >> off
>> >>
>> >> any way to resolved this ?
>> >>
>> >> On Tue, Apr 18, 2017 at 1:24 AM Benoit St-Jean <[hidden email]>
>> >> wrote:
>> >>>
>> >>> Try this:
>> >>>
>> >>> | sql conn connectionSpec result  |
>> >>> sql := 'SELECT * FROM search_terms'.
>> >>> conn := GAConnection new.
>> >>> connectionSpec := GAConnectionArgs
>> >>>                             hostname: 'localhost'
>> >>>                             portno: 5432
>> >>>                             databaseName: 'sodbxtest'
>> >>>                             userName: 'sodbxtest'
>> >>>                             password: 'sodbxtest'.
>> >>> conn connectionArgs: connectionSpec.
>> >>>
>> >>> "Connect to the server"
>> >>> result := conn startup.
>> >>> (result errorResponse isKindOf: GAErrorResponse) ifTrue: [ self halt
>> >>> ].
>> >>>
>> >>> "Execute your SQL stuff"
>> >>> result := conn execute: sql.
>> >>> (result errorResponse isKindOf: GAErrorResponse) ifTrue: [ self halt ]
>> >>> ifFalse: [result inspect].
>> >>>
>> >>> "Disconnect from the server"
>> >>> conn close.
>> >>>
>> >>>
>> >>> -----------------
>> >>> Benoît St-Jean
>> >>> Yahoo! Messenger: bstjean
>> >>> Twitter: @BenLeChialeux
>> >>> Pinterest: benoitstjean
>> >>> Instagram: Chef_Benito
>> >>> IRC: lamneth
>> >>> Blogue: endormitoire.wordpress.com
>> >>> "A standpoint is an intellectual horizon of radius zero".  (A.
>> >>> Einstein)
>> >>>
>> >>>
>> >>> ________________________________
>> >>> From: Dimitris Chloupis <[hidden email]>
>> >>> To: Benoit St-Jean <[hidden email]>; Any question about pharo is
>> >>> welcome <[hidden email]>
>> >>> Sent: Monday, April 17, 2017 5:24 PM
>> >>>
>> >>> Subject: Re: [Pharo-users] PostgreSQL and Pharo 6
>> >>>
>> >>> Following the instructions here
>> >>>
>> >>> http://guillep.github.io/DBXTalk/garage/installation.html
>> >>>
>> >>> I did
>> >>>
>> >>> Gofer it
>> >>> smalltalkhubUser: 'DBXTalk' project: 'Garage';
>> >>> configurationOf: 'Garage';
>> >>> load.
>> >>>
>> >>>
>> >>> (ConfigurationOfGarage project version: '0.5')
>> >>> load: 'postgresV2'.
>> >>>
>> >>> And it did install
>> >>>
>> >>>
>> >>> On Tue, 18 Apr 2017 at 00:02, Benoit St-Jean <[hidden email]>
>> >>> wrote:
>> >>>
>> >>> Tell me which exact package you loaded (or even better, the exact to
>> >>> load
>> >>> it) and I will test some code against my PostgreSQL server...
>> >>>
>> >>>
>> >>> -----------------
>> >>> Benoît St-Jean
>> >>> Yahoo! Messenger: bstjean
>> >>> Twitter: @BenLeChialeux
>> >>> Pinterest: benoitstjean
>> >>> Instagram: Chef_Benito
>> >>> IRC: lamneth
>> >>> Blogue: endormitoire.wordpress.com
>> >>> "A standpoint is an intellectual horizon of radius zero".  (A.
>> >>> Einstein)
>> >>>
>> >>>
>> >>> ________________________________
>> >>> From: Dimitris Chloupis <[hidden email]>
>> >>> To: Benoit St-Jean <[hidden email]>; Any question about pharo is
>> >>> welcome <[hidden email]>
>> >>> Sent: Monday, April 17, 2017 4:55 PM
>> >>>
>> >>> Subject: Re: [Pharo-users] PostgreSQL and Pharo 6
>> >>>
>> >>> no conn connect does not work because GAConnection has no such method.
>> >>> #connect exist in GAPostgresDrive but even if I go that route I get
>> >>> error
>> >>> #OptionAt:IfAbsent: was sent to nil . With this code
>> >>>
>> >>> conn2 := GAPostgresDriver new .
>> >>> conn2 host: 'ec2-**-***-***-185.eu-west-1.compute.amazonaws.com'
>> >>> port: '****'
>> >>> database:'*******'
>> >>> user: '*****'
>> >>> password:''***'.
>> >>> conn2 connect.
>> >>>
>> >>> Is there sample code that connects to online databases ?
>> >>>
>> >>>
>> >>>
>> >>> On Mon, Apr 17, 2017 at 11:18 PM Benoit St-Jean <[hidden email]>
>> >>> wrote:
>> >>>
>> >>> You have to #connect before executing SQL statements!
>> >>>
>> >>> Something like (in your code):
>> >>>
>> >>> conn connect.
>> >>>
>> >>> -----------------
>> >>> Benoît St-Jean
>> >>> Yahoo! Messenger: bstjean
>> >>> Twitter: @BenLeChialeux
>> >>> Pinterest: benoitstjean
>> >>> Instagram: Chef_Benito
>> >>> IRC: lamneth
>> >>> Blogue: endormitoire.wordpress.com
>> >>> "A standpoint is an intellectual horizon of radius zero".  (A.
>> >>> Einstein)
>> >>>
>> >>>
>> >>> ________________________________
>> >>> From: Dimitris Chloupis <[hidden email]>
>> >>> To: Benoit St-Jean <[hidden email]>; Any question about pharo is
>> >>> welcome <[hidden email]>
>> >>> Sent: Monday, April 17, 2017 3:54 PM
>> >>> Subject: Re: [Pharo-users] PostgreSQL and Pharo 6
>> >>>
>> >>> Installing from Catalog Browser fails
>> >>>
>> >>> I installed it via the the website instructions, it installs fine
>> >>>
>> >>> But if I use it this way
>> >>>
>> >>> conn := GAConnection new.
>> >>> ca := GAConnectionArgs hostname:
>> >>> 'ec2-**-***-***-185.eu-west-1.compute.amazonaws.com'
>> >>> portno: '****'
>> >>> databaseName:'*******'
>> >>> userName: '*****'
>> >>> password:''***'.
>> >>> conn connectionArgs: ca.
>> >>> conn execute: 'select * from search_terms'.
>> >>>
>> >>> it fails with no connection, is there anything else i need to do ?
>> >>> is there a guide for how to use this ?
>> >>>
>> >>>
>> >>>
>> >>> On Mon, Apr 17, 2017 at 7:30 PM Dimitris Chloupis
>> >>> <[hidden email]>
>> >>> wrote:
>> >>>
>> >>> thank you Benoit
>> >>>
>> >>> On Mon, Apr 17, 2017 at 4:23 AM Benoit St-Jean via Pharo-users
>> >>> <[hidden email]> wrote:
>> >>>
>> >>> ODBC worked fine as well if you don't need native driver access
>> >>>
>> >>> -----------------
>> >>> Benoît St-Jean
>> >>> Yahoo! Messenger: bstjean
>> >>> Twitter: @BenLeChialeux
>> >>> Pinterest: benoitstjean
>> >>> Instagram: Chef_Benito
>> >>> IRC: lamneth
>> >>> Blogue: endormitoire.wordpress.com
>> >>> "A standpoint is an intellectual horizon of radius zero".  (A.
>> >>> Einstein)
>> >>>
>> >>>
>> >>> ________________________________
>> >>> From: Dimitris Chloupis <[hidden email]>
>> >>> To: Any question about pharo is welcome <[hidden email]>
>> >>> Sent: Sunday, April 16, 2017 4:37 AM
>> >>> Subject: [Pharo-users] PostgreSQL and Pharo 6
>> >>>
>> >>> Hey guys , I play with PostgreSQL and I really like it, sorry Esteban
>> >>> :D
>> >>>
>> >>> I am using Python for it but I would like to give access also to Pharo
>> >>> to
>> >>> my database. I was informed that Garage has a driver for PostgreSQL ,
>> >>> is
>> >>> there any other candidate ? Any advice ?
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >
>>
>



Reply | Threaded
Open this post in threaded view
|

Re: PostgreSQL and Pharo 6

kilon.alios
If I disable ssl I would make database insecure, but yeah it would not matter so much as the data is not sensitive in any way. I will try that, good idea.
On Tue, 18 Apr 2017 at 18:22, Benoit St-Jean via Pharo-users <[hidden email]> wrote:
Do you absolutely need SSL or you can connect to this server without it? 

Esteban is right : writing a driver from scratch takes quite some time!  It would be way easier to add SSL support to the existing one.


 
-----------------
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)



From: Dimitris Chloupis <[hidden email]>
To: Any question about pharo is welcome <[hidden email]>
Sent: Tuesday, April 18, 2017 11:02 AM

Subject: Re: [Pharo-users] PostgreSQL and Pharo 6

Sure but most probably I won't do either and abandon the effort. By API I did not mean to wrap the entire thing only a dozen of functions, the bare minimum I want to make this work. Including SSL. Will give a try at some point in the future and if it's easy will do. If not , no big deal.

There is also the possibility of using the Python library for PostgreSQL from inside Pharo via my Python IPC API, Atlas. I just did not want to add Python as dependency for a Pharo library. But for now is the easiest solution .
On Tue, 18 Apr 2017 at 17:51, Esteban A. Maringolo <[hidden email]> wrote:
All current PostgreSQL drivers are 100% written in Smalltalk, I
haven't used the V3 version (binary), but the V2 is more than good
enough even for production systems.

Writing a new driver using the libpq shared library might be a fun
project, but a lot of work; maybe it will be more fun adding the
SSL/TLS to the current Smalltalk implementation :)

Regards,

Esteban A. Maringolo


2017-04-18 11:19 GMT-03:00 Dimitris Chloupis <[hidden email]>:
> Looks like I will have to make my own PostgreSQL API . Nice excuse to test
> my UFFI skills once more :)
>
> On Tue, 18 Apr 2017 at 16:17, Esteban A. Maringolo <[hidden email]>
> wrote:
>>
>> Not that I'm aware of.
>>
>> You can create a ssh tunnel that ciphers the data between your host
>> and the remote server, but you'd need a ssh daemon running in the
>> server host.
>>
>> Regards,
>>
>> Esteban A. Maringolo
>>
>>
>> 2017-04-18 5:09 GMT-03:00 Dimitris Chloupis <[hidden email]>:
>> > After some investigation in Heroku documentation, the database expects a
>> > SSL
>> > connection but it seems the driver does not use SSL , any way to force
>> > Garage to use SSL ?
>> >
>> > On Tue, 18 Apr 2017 at 10:07, Dimitris Chloupis <[hidden email]>
>> > wrote:
>> >>
>> >> I adjusted it for my database and gives me error
>> >>
>> >> EFATAL:  no pg_hba.conf entry for host "", user "", database "", SSL
>> >> off
>> >>
>> >> any way to resolved this ?
>> >>
>> >> On Tue, Apr 18, 2017 at 1:24 AM Benoit St-Jean <[hidden email]>
>> >> wrote:
>> >>>
>> >>> Try this:
>> >>>
>> >>> | sql conn connectionSpec result  |
>> >>> sql := 'SELECT * FROM search_terms'.
>> >>> conn := GAConnection new.
>> >>> connectionSpec := GAConnectionArgs
>> >>>                             hostname: 'localhost'
>> >>>                             portno: 5432
>> >>>                             databaseName: 'sodbxtest'
>> >>>                             userName: 'sodbxtest'
>> >>>                             password: 'sodbxtest'.
>> >>> conn connectionArgs: connectionSpec.
>> >>>
>> >>> "Connect to the server"
>> >>> result := conn startup.
>> >>> (result errorResponse isKindOf: GAErrorResponse) ifTrue: [ self halt
>> >>> ].
>> >>>
>> >>> "Execute your SQL stuff"
>> >>> result := conn execute: sql.
>> >>> (result errorResponse isKindOf: GAErrorResponse) ifTrue: [ self halt ]
>> >>> ifFalse: [result inspect].
>> >>>
>> >>> "Disconnect from the server"
>> >>> conn close.
>> >>>
>> >>>
>> >>> -----------------
>> >>> Benoît St-Jean
>> >>> Yahoo! Messenger: bstjean
>> >>> Twitter: @BenLeChialeux
>> >>> Pinterest: benoitstjean
>> >>> Instagram: Chef_Benito
>> >>> IRC: lamneth
>> >>> Blogue: endormitoire.wordpress.com
>> >>> "A standpoint is an intellectual horizon of radius zero".  (A.
>> >>> Einstein)
>> >>>
>> >>>
>> >>> ________________________________
>> >>> From: Dimitris Chloupis <[hidden email]>
>> >>> To: Benoit St-Jean <[hidden email]>; Any question about pharo is
>> >>> welcome <[hidden email]>
>> >>> Sent: Monday, April 17, 2017 5:24 PM
>> >>>
>> >>> Subject: Re: [Pharo-users] PostgreSQL and Pharo 6
>> >>>
>> >>> Following the instructions here
>> >>>
>> >>> http://guillep.github.io/DBXTalk/garage/installation.html
>> >>>
>> >>> I did
>> >>>
>> >>> Gofer it
>> >>> smalltalkhubUser: 'DBXTalk' project: 'Garage';
>> >>> configurationOf: 'Garage';
>> >>> load.
>> >>>
>> >>>
>> >>> (ConfigurationOfGarage project version: '0.5')
>> >>> load: 'postgresV2'.
>> >>>
>> >>> And it did install
>> >>>
>> >>>
>> >>> On Tue, 18 Apr 2017 at 00:02, Benoit St-Jean <[hidden email]>
>> >>> wrote:
>> >>>
>> >>> Tell me which exact package you loaded (or even better, the exact to
>> >>> load
>> >>> it) and I will test some code against my PostgreSQL server...
>> >>>
>> >>>
>> >>> -----------------
>> >>> Benoît St-Jean
>> >>> Yahoo! Messenger: bstjean
>> >>> Twitter: @BenLeChialeux
>> >>> Pinterest: benoitstjean
>> >>> Instagram: Chef_Benito
>> >>> IRC: lamneth
>> >>> Blogue: endormitoire.wordpress.com
>> >>> "A standpoint is an intellectual horizon of radius zero".  (A.
>> >>> Einstein)
>> >>>
>> >>>
>> >>> ________________________________
>> >>> From: Dimitris Chloupis <[hidden email]>
>> >>> To: Benoit St-Jean <[hidden email]>; Any question about pharo is
>> >>> welcome <[hidden email]>
>> >>> Sent: Monday, April 17, 2017 4:55 PM
>> >>>
>> >>> Subject: Re: [Pharo-users] PostgreSQL and Pharo 6
>> >>>
>> >>> no conn connect does not work because GAConnection has no such method.
>> >>> #connect exist in GAPostgresDrive but even if I go that route I get
>> >>> error
>> >>> #OptionAt:IfAbsent: was sent to nil . With this code
>> >>>
>> >>> conn2 := GAPostgresDriver new .
>> >>> conn2 host: 'ec2-**-***-***-185.eu-west-1.compute.amazonaws.com'
>> >>> port: '****'
>> >>> database:'*******'
>> >>> user: '*****'
>> >>> password:''***'.
>> >>> conn2 connect.
>> >>>
>> >>> Is there sample code that connects to online databases ?
>> >>>
>> >>>
>> >>>
>> >>> On Mon, Apr 17, 2017 at 11:18 PM Benoit St-Jean <[hidden email]>
>> >>> wrote:
>> >>>
>> >>> You have to #connect before executing SQL statements!
>> >>>
>> >>> Something like (in your code):
>> >>>
>> >>> conn connect.
>> >>>
>> >>> -----------------
>> >>> Benoît St-Jean
>> >>> Yahoo! Messenger: bstjean
>> >>> Twitter: @BenLeChialeux
>> >>> Pinterest: benoitstjean
>> >>> Instagram: Chef_Benito
>> >>> IRC: lamneth
>> >>> Blogue: endormitoire.wordpress.com
>> >>> "A standpoint is an intellectual horizon of radius zero".  (A.
>> >>> Einstein)
>> >>>
>> >>>
>> >>> ________________________________
>> >>> From: Dimitris Chloupis <[hidden email]>
>> >>> To: Benoit St-Jean <[hidden email]>; Any question about pharo is
>> >>> welcome <[hidden email]>
>> >>> Sent: Monday, April 17, 2017 3:54 PM
>> >>> Subject: Re: [Pharo-users] PostgreSQL and Pharo 6
>> >>>
>> >>> Installing from Catalog Browser fails
>> >>>
>> >>> I installed it via the the website instructions, it installs fine
>> >>>
>> >>> But if I use it this way
>> >>>
>> >>> conn := GAConnection new.
>> >>> ca := GAConnectionArgs hostname:
>> >>> 'ec2-**-***-***-185.eu-west-1.compute.amazonaws.com'
>> >>> portno: '****'
>> >>> databaseName:'*******'
>> >>> userName: '*****'
>> >>> password:''***'.
>> >>> conn connectionArgs: ca.
>> >>> conn execute: 'select * from search_terms'.
>> >>>
>> >>> it fails with no connection, is there anything else i need to do ?
>> >>> is there a guide for how to use this ?
>> >>>
>> >>>
>> >>>
>> >>> On Mon, Apr 17, 2017 at 7:30 PM Dimitris Chloupis
>> >>> <[hidden email]>
>> >>> wrote:
>> >>>
>> >>> thank you Benoit
>> >>>
>> >>> On Mon, Apr 17, 2017 at 4:23 AM Benoit St-Jean via Pharo-users
>> >>> <[hidden email]> wrote:
>> >>>
>> >>> ODBC worked fine as well if you don't need native driver access
>> >>>
>> >>> -----------------
>> >>> Benoît St-Jean
>> >>> Yahoo! Messenger: bstjean
>> >>> Twitter: @BenLeChialeux
>> >>> Pinterest: benoitstjean
>> >>> Instagram: Chef_Benito
>> >>> IRC: lamneth
>> >>> Blogue: endormitoire.wordpress.com
>> >>> "A standpoint is an intellectual horizon of radius zero".  (A.
>> >>> Einstein)
>> >>>
>> >>>
>> >>> ________________________________
>> >>> From: Dimitris Chloupis <[hidden email]>
>> >>> To: Any question about pharo is welcome <[hidden email]>
>> >>> Sent: Sunday, April 16, 2017 4:37 AM
>> >>> Subject: [Pharo-users] PostgreSQL and Pharo 6
>> >>>
>> >>> Hey guys , I play with PostgreSQL and I really like it, sorry Esteban
>> >>> :D
>> >>>
>> >>> I am using Python for it but I would like to give access also to Pharo
>> >>> to
>> >>> my database. I was informed that Garage has a driver for PostgreSQL ,
>> >>> is
>> >>> there any other candidate ? Any advice ?
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >
>>
>



Reply | Threaded
Open this post in threaded view
|

Re: PostgreSQL and Pharo 6

kilon.alios
And nope it does not allow for disabling SSL , time to use old reliable Python and make my life a ton easier :D
On Tue, 18 Apr 2017 at 18:29, Dimitris Chloupis <[hidden email]> wrote:
If I disable ssl I would make database insecure, but yeah it would not matter so much as the data is not sensitive in any way. I will try that, good idea.
On Tue, 18 Apr 2017 at 18:22, Benoit St-Jean via Pharo-users <[hidden email]> wrote:
Do you absolutely need SSL or you can connect to this server without it? 

Esteban is right : writing a driver from scratch takes quite some time!  It would be way easier to add SSL support to the existing one.


 
-----------------
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)



From: Dimitris Chloupis <[hidden email]>
To: Any question about pharo is welcome <[hidden email]>
Sent: Tuesday, April 18, 2017 11:02 AM

Subject: Re: [Pharo-users] PostgreSQL and Pharo 6

Sure but most probably I won't do either and abandon the effort. By API I did not mean to wrap the entire thing only a dozen of functions, the bare minimum I want to make this work. Including SSL. Will give a try at some point in the future and if it's easy will do. If not , no big deal.

There is also the possibility of using the Python library for PostgreSQL from inside Pharo via my Python IPC API, Atlas. I just did not want to add Python as dependency for a Pharo library. But for now is the easiest solution .
On Tue, 18 Apr 2017 at 17:51, Esteban A. Maringolo <[hidden email]> wrote:
All current PostgreSQL drivers are 100% written in Smalltalk, I
haven't used the V3 version (binary), but the V2 is more than good
enough even for production systems.

Writing a new driver using the libpq shared library might be a fun
project, but a lot of work; maybe it will be more fun adding the
SSL/TLS to the current Smalltalk implementation :)

Regards,

Esteban A. Maringolo


2017-04-18 11:19 GMT-03:00 Dimitris Chloupis <[hidden email]>:
> Looks like I will have to make my own PostgreSQL API . Nice excuse to test
> my UFFI skills once more :)
>
> On Tue, 18 Apr 2017 at 16:17, Esteban A. Maringolo <[hidden email]>
> wrote:
>>
>> Not that I'm aware of.
>>
>> You can create a ssh tunnel that ciphers the data between your host
>> and the remote server, but you'd need a ssh daemon running in the
>> server host.
>>
>> Regards,
>>
>> Esteban A. Maringolo
>>
>>
>> 2017-04-18 5:09 GMT-03:00 Dimitris Chloupis <[hidden email]>:
>> > After some investigation in Heroku documentation, the database expects a
>> > SSL
>> > connection but it seems the driver does not use SSL , any way to force
>> > Garage to use SSL ?
>> >
>> > On Tue, 18 Apr 2017 at 10:07, Dimitris Chloupis <[hidden email]>
>> > wrote:
>> >>
>> >> I adjusted it for my database and gives me error
>> >>
>> >> EFATAL:  no pg_hba.conf entry for host "", user "", database "", SSL
>> >> off
>> >>
>> >> any way to resolved this ?
>> >>
>> >> On Tue, Apr 18, 2017 at 1:24 AM Benoit St-Jean <[hidden email]>
>> >> wrote:
>> >>>
>> >>> Try this:
>> >>>
>> >>> | sql conn connectionSpec result  |
>> >>> sql := 'SELECT * FROM search_terms'.
>> >>> conn := GAConnection new.
>> >>> connectionSpec := GAConnectionArgs
>> >>>                             hostname: 'localhost'
>> >>>                             portno: 5432
>> >>>                             databaseName: 'sodbxtest'
>> >>>                             userName: 'sodbxtest'
>> >>>                             password: 'sodbxtest'.
>> >>> conn connectionArgs: connectionSpec.
>> >>>
>> >>> "Connect to the server"
>> >>> result := conn startup.
>> >>> (result errorResponse isKindOf: GAErrorResponse) ifTrue: [ self halt
>> >>> ].
>> >>>
>> >>> "Execute your SQL stuff"
>> >>> result := conn execute: sql.
>> >>> (result errorResponse isKindOf: GAErrorResponse) ifTrue: [ self halt ]
>> >>> ifFalse: [result inspect].
>> >>>
>> >>> "Disconnect from the server"
>> >>> conn close.
>> >>>
>> >>>
>> >>> -----------------
>> >>> Benoît St-Jean
>> >>> Yahoo! Messenger: bstjean
>> >>> Twitter: @BenLeChialeux
>> >>> Pinterest: benoitstjean
>> >>> Instagram: Chef_Benito
>> >>> IRC: lamneth
>> >>> Blogue: endormitoire.wordpress.com
>> >>> "A standpoint is an intellectual horizon of radius zero".  (A.
>> >>> Einstein)
>> >>>
>> >>>
>> >>> ________________________________
>> >>> From: Dimitris Chloupis <[hidden email]>
>> >>> To: Benoit St-Jean <[hidden email]>; Any question about pharo is
>> >>> welcome <[hidden email]>
>> >>> Sent: Monday, April 17, 2017 5:24 PM
>> >>>
>> >>> Subject: Re: [Pharo-users] PostgreSQL and Pharo 6
>> >>>
>> >>> Following the instructions here
>> >>>
>> >>> http://guillep.github.io/DBXTalk/garage/installation.html
>> >>>
>> >>> I did
>> >>>
>> >>> Gofer it
>> >>> smalltalkhubUser: 'DBXTalk' project: 'Garage';
>> >>> configurationOf: 'Garage';
>> >>> load.
>> >>>
>> >>>
>> >>> (ConfigurationOfGarage project version: '0.5')
>> >>> load: 'postgresV2'.
>> >>>
>> >>> And it did install
>> >>>
>> >>>
>> >>> On Tue, 18 Apr 2017 at 00:02, Benoit St-Jean <[hidden email]>
>> >>> wrote:
>> >>>
>> >>> Tell me which exact package you loaded (or even better, the exact to
>> >>> load
>> >>> it) and I will test some code against my PostgreSQL server...
>> >>>
>> >>>
>> >>> -----------------
>> >>> Benoît St-Jean
>> >>> Yahoo! Messenger: bstjean
>> >>> Twitter: @BenLeChialeux
>> >>> Pinterest: benoitstjean
>> >>> Instagram: Chef_Benito
>> >>> IRC: lamneth
>> >>> Blogue: endormitoire.wordpress.com
>> >>> "A standpoint is an intellectual horizon of radius zero".  (A.
>> >>> Einstein)
>> >>>
>> >>>
>> >>> ________________________________
>> >>> From: Dimitris Chloupis <[hidden email]>
>> >>> To: Benoit St-Jean <[hidden email]>; Any question about pharo is
>> >>> welcome <[hidden email]>
>> >>> Sent: Monday, April 17, 2017 4:55 PM
>> >>>
>> >>> Subject: Re: [Pharo-users] PostgreSQL and Pharo 6
>> >>>
>> >>> no conn connect does not work because GAConnection has no such method.
>> >>> #connect exist in GAPostgresDrive but even if I go that route I get
>> >>> error
>> >>> #OptionAt:IfAbsent: was sent to nil . With this code
>> >>>
>> >>> conn2 := GAPostgresDriver new .
>> >>> conn2 host: 'ec2-**-***-***-185.eu-west-1.compute.amazonaws.com'
>> >>> port: '****'
>> >>> database:'*******'
>> >>> user: '*****'
>> >>> password:''***'.
>> >>> conn2 connect.
>> >>>
>> >>> Is there sample code that connects to online databases ?
>> >>>
>> >>>
>> >>>
>> >>> On Mon, Apr 17, 2017 at 11:18 PM Benoit St-Jean <[hidden email]>
>> >>> wrote:
>> >>>
>> >>> You have to #connect before executing SQL statements!
>> >>>
>> >>> Something like (in your code):
>> >>>
>> >>> conn connect.
>> >>>
>> >>> -----------------
>> >>> Benoît St-Jean
>> >>> Yahoo! Messenger: bstjean
>> >>> Twitter: @BenLeChialeux
>> >>> Pinterest: benoitstjean
>> >>> Instagram: Chef_Benito
>> >>> IRC: lamneth
>> >>> Blogue: endormitoire.wordpress.com
>> >>> "A standpoint is an intellectual horizon of radius zero".  (A.
>> >>> Einstein)
>> >>>
>> >>>
>> >>> ________________________________
>> >>> From: Dimitris Chloupis <[hidden email]>
>> >>> To: Benoit St-Jean <[hidden email]>; Any question about pharo is
>> >>> welcome <[hidden email]>
>> >>> Sent: Monday, April 17, 2017 3:54 PM
>> >>> Subject: Re: [Pharo-users] PostgreSQL and Pharo 6
>> >>>
>> >>> Installing from Catalog Browser fails
>> >>>
>> >>> I installed it via the the website instructions, it installs fine
>> >>>
>> >>> But if I use it this way
>> >>>
>> >>> conn := GAConnection new.
>> >>> ca := GAConnectionArgs hostname:
>> >>> 'ec2-**-***-***-185.eu-west-1.compute.amazonaws.com'
>> >>> portno: '****'
>> >>> databaseName:'*******'
>> >>> userName: '*****'
>> >>> password:''***'.
>> >>> conn connectionArgs: ca.
>> >>> conn execute: 'select * from search_terms'.
>> >>>
>> >>> it fails with no connection, is there anything else i need to do ?
>> >>> is there a guide for how to use this ?
>> >>>
>> >>>
>> >>>
>> >>> On Mon, Apr 17, 2017 at 7:30 PM Dimitris Chloupis
>> >>> <[hidden email]>
>> >>> wrote:
>> >>>
>> >>> thank you Benoit
>> >>>
>> >>> On Mon, Apr 17, 2017 at 4:23 AM Benoit St-Jean via Pharo-users
>> >>> <[hidden email]> wrote:
>> >>>
>> >>> ODBC worked fine as well if you don't need native driver access
>> >>>
>> >>> -----------------
>> >>> Benoît St-Jean
>> >>> Yahoo! Messenger: bstjean
>> >>> Twitter: @BenLeChialeux
>> >>> Pinterest: benoitstjean
>> >>> Instagram: Chef_Benito
>> >>> IRC: lamneth
>> >>> Blogue: endormitoire.wordpress.com
>> >>> "A standpoint is an intellectual horizon of radius zero".  (A.
>> >>> Einstein)
>> >>>
>> >>>
>> >>> ________________________________
>> >>> From: Dimitris Chloupis <[hidden email]>
>> >>> To: Any question about pharo is welcome <[hidden email]>
>> >>> Sent: Sunday, April 16, 2017 4:37 AM
>> >>> Subject: [Pharo-users] PostgreSQL and Pharo 6
>> >>>
>> >>> Hey guys , I play with PostgreSQL and I really like it, sorry Esteban
>> >>> :D
>> >>>
>> >>> I am using Python for it but I would like to give access also to Pharo
>> >>> to
>> >>> my database. I was informed that Garage has a driver for PostgreSQL ,
>> >>> is
>> >>> there any other candidate ? Any advice ?
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >
>>
>



12