https://bugs.freedesktop.org/show_bug.cgi?id=43369
Bug #: 43369
Summary: Better specific UI for connecting to PostgreSQL
Classification: Unclassified
Product: LibreOffice
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: medium
Component: Database
AssignedTo: [email protected]
ReportedBy: [email protected]
Created attachment 53965
--> https://bugs.freedesktop.org/attachment.cgi?id=53965
screenshot of MySQL-specific UI
When connecting to a PostgreSQL database (through PostgreSQL-SDBC driver), we
currently just ask the user to type a conninfo string. That's familiar to
PostgreSQL experts, but other people would benefit from some hand-holding.
Implement a PostgreSQL-specific UI to get the connection info, along the lines
of the MySQL-specific UI we already have.
The file you need to change in LibreOffice is
dbaccess/source/ui/dlg/ConnectionHelper.cxx, in function
IMPL_LINK(OConnectionHelper, OnBrowseConnections, PushButton*, /*_pButton*/)
there is a big
switch ( eType )
We need to add a case for PostgreSQL. You can take inspiration from the MySQL
case.
You may also need to adapt
ODbDataSourceAdministrationHelper::getConnectionURL() in file DbAdminImpl.cxx,
as well as ODbTypeWizDialog::determineNextState in file dbwiz to activate a new
state ADDITIONAL_PAGE_PGSQL, which you have to create first.
Finally, the dialog itself would be in file
dbaccess/source/ui/dlg/dbadminsetup.src, in a to-be-created section TabPage
PAGE_DBWIZARD_PGSQL.
You could just generate a conninfo string from that, but I'd prefer if you set
it as properties of the datasouce/database/..., so that the driver gets it
through the same interface as the username and password; cf handling of these
for inspiration. There is already support for that in the driver, see
connectivity/source/drivers/postgresql/pq_connection.cxx, function
properties2arrays. POssibly you need to extend the handling there to support
more keywords.
Please *also* allow advanced users to enter a conninfo string, and mixing of
entering a conninfo string (like now) and information through widgets in the
specific UI. See
http://developer.postgresql.org/pgdocs/postgres/libpq-connect.html#LIBPQ-PQCONNECTDBPARAMS
for an up-to-date list of all recognised connection settings. Make a decision
on which of these settings make or do not make sense to give a friendly UI for.
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs