Need example of usage DerelictPQ

Adam D. Ruppe via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Dec 28 19:43:56 PST 2014


On Sunday, 28 December 2014 at 08:41:15 UTC, Suliman wrote:
> import postgres;
> import database;

Those should include the package name:

import arsd.postgres;

Since it publicly imports the base clas, you don't need to import 
database yourself. (You do still need to pass all files to dmd 
though, your command line should remain the same.

> and getting next error:

Those are protection errors because the package name isn't right, 
fix that and it should work (assuming you haven't modified the 
other source files)

> Also I can't understand why I do not need specify login and 
> pass when I connection to DB?

Postgresql authenticates based on what operating system user 
you're logged in as. You can change that in the server settings 
but normally the default works well.


More information about the Digitalmars-d-learn mailing list