question on dub and postgresql

drug drug2004 at
Mon Oct 5 09:15:59 UTC 2020

On 10/5/20 12:05 PM, Alaindevos wrote:
> On Monday, 5 October 2020 at 08:54:39 UTC, Daniel Kozak wrote:
>> On Mon, Oct 5, 2020 at 10:25 AM Alaindevos via Digitalmars-d-learn < 
>> digitalmars-d-learn at> wrote:
>>> Can I say python has pip, ruby has bundle and D has dub.
>>> Meaning they perform the same function ?
>>> Or am I wrong?
>> Yes and no. Dub is Dlang dependency solution but it is not installer 
>> as pip is
>>> As I use unix the parameters for include and library are a real
>>> pain.
>>> I have totally no idea how to connect to a postgresql database.
>>> Where and how do I start to connect to a postgresql database ?
>>> I write a .d program to connect.
>>> But then I need to include the database-connection-library.d file.
>>> Where do I place it ?
>>> And link a database-connection. object file.
>>> How is it installed ? There is a only a git i can clone ?
>>> Do I need to create and edit a specific dub json config file ?
>>> It is very unclear how to start.
>> Yes if you want to use any of dub packages you need to add it as a 
>> dependency to your dub.json (dub.sdl)
> A name dependency solution is at least vage.
> How do I install ,
> on unix so in the code i write the .d files of that library and after 
> compilation linked to the libary shared objects. For that shared object 
> must be installed. How ?

Take a look at
This is how packages work in D
To add dpq2 dependency to your project you need to execute the command:
dub add dpq2
it adds the last version of the dpq2 package. After this you are able to 
use this package in your project just import it in your source files.

More information about the Digitalmars-d-learn mailing list