Specification of "/" in the host name (for Unix socket support)
От | Deepak Bhole |
---|---|
Тема | Specification of "/" in the host name (for Unix socket support) |
Дата | |
Msg-id | 1063394449.10113.2.camel@tomacco.toronto.redhat.com обсуждение исходный текст |
Ответы |
Re: Specification of "/" in the host name (for Unix socket support)
Re: Specification of "/" in the host name (for Unix socket support) |
Список | pgsql-jdbc |
Hi, We are trying to add support for Unix sockets to the current jdbc (for our own release for now). The support is added via gnu classpath,located at: http://www.nfrese.net/software/gnu_net_local/overview.html Since Unix sockets require specification of path to the socket, the url would be something like: jdbc:postgresql:///tmp:5432/template1... However, since the path starts with a "/" which is a token separator, parseURL in Driver.java cannot handle it, and sets the host to "/". To find possible solutions, we referred to the URL RFC located at: http://www.w3.org/Addressing/rfc1738.txt Section 5, the BNF mentions that "% <hex> <hex>" is an escaped character. We are thinking of implementing a similar idea for the jdbc url. i.e. the URL jdbc:postgresql:///tmp:5432/template1... would have to be specified as jdbc:postgresql://%2Ftmp:5432/template1... , 2F being the ascii code for "/" in hex. This would of course necessitate the addition of an extra function for parsing tokens but it would be fairly simple to implement. Does the above mentioned approach seem reasonable or is there another format that should be followed? Thanks, Deepak -- Deepak Bhole <dbhole@redhat.com> Red Hat Canada Ltd.
В списке pgsql-jdbc по дате отправления: