- Notifications
You must be signed in to change notification settings - Fork5
Commitb035cb9
committed
Accept postgres:// URIs in libpq connection functions
postgres:// URIs are an attempt to "stop the bleeding" in this generalarea that has been said to occur due to external projects adopting theirown syntaxes. The syntaxes supported by this patch: postgres://[user[:pwd]@][unix-socket][:port[/dbname]][?param1=value1&...] postgres://[user[:pwd]@][net-location][:port][/dbname][?param1=value1&...]should be enough to cover most interesting cases without having toresort to "param=value" pairs, but those are provided for the cases thatneed them regardless.libpq documentation has been shuffled around a bit, to avoid stuffingall the format details into the PQconnectdbParams description, which wasalready a bit overwhelming. The list of keywords has moved to its ownsubsection, and the details on the URI format live in another subsection.This includes a simple test program, as requested in discussion, toensure that interesting corner cases continue to work appropriately inthe future.Author: Alexander ShulginSome tweaking by Álvaro Herrera, Greg Smith, Daniel Farina, Peter EisentrautReviewed by Robert Haas, Alexey Klyukin (offlist), Heikki Linnakangas,Marko Kreen, and othersOh, it also supports postgresql:// but that's probably just an accident.1 parent3769fa5 commitb035cb9
File tree
10 files changed
+1714
-605
lines changed- doc/src/sgml
- ref
- src/interfaces/libpq
- test
10 files changed
+1714
-605
lines changedLines changed: 633 additions & 531 deletions
Large diffs are not rendered by default.
Lines changed: 8 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
115 | 115 |
| |
116 | 116 |
| |
117 | 117 |
| |
118 |
| - | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
119 | 122 |
| |
120 | 123 |
| |
121 | 124 |
| |
| |||
596 | 599 |
| |
597 | 600 |
| |
598 | 601 |
| |
599 |
| - | |
600 |
| - | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
601 | 605 |
| |
602 | 606 |
| |
603 | 607 |
| |
| 608 | + | |
604 | 609 |
| |
605 | 610 |
| |
606 | 611 |
| |
|
Lines changed: 5 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
121 | 121 |
| |
122 | 122 |
| |
123 | 123 |
| |
| 124 | + | |
| 125 | + | |
| 126 | + | |
124 | 127 |
| |
125 | 128 |
| |
126 | 129 |
| |
| |||
132 | 135 |
| |
133 | 136 |
| |
134 | 137 |
| |
| 138 | + | |
135 | 139 |
| |
136 | 140 |
| |
137 | 141 |
| |
| |||
142 | 146 |
| |
143 | 147 |
| |
144 | 148 |
| |
| 149 | + | |
145 | 150 |
|
0 commit comments
Comments
(0)