On Wed, Apr 13, 2016 at 2:15 AM, Justin Deoliveira <jdeol...@gmail.com>
wrote:
> Hey folks,
>
> I wanted to start a new thread on this topic to talk about implementation
> approach, since I think we can all agree that the current patch (which has
> been closed) needs to be redone, at least to some extent.
>
> In general I can think of two approaches to this:
>
> 1. Follow the path laid down by the existing patch and add a custom class
> to represent this “extended date type”. And then add the converter logic,
> etc… to handle converting it to/from it’s native “bigint” representation.
>
> 2. Try to approach this by shuffling along some extra metadata in the
> attribute type for the column. We already store the “native typename” for
> attributes… so I wonder if we can use that to drive the special logic for
> date handling.
>
> Alternatives very welcome.
>
> Both of these approaches rest of the idea of adding “well known” domain
> types that we would handle in the database, the one from the patch is named
> “bigdate”. So I guess one open question to the other developers is if we
> are ok with the idea to latching onto types that aren’t “standard”.
>
I guess it would be ok provided that we document what extra custom types we
can understand (as it would be our own name based convention no?).
I'd also go for 1, but I'm worried about converters, ust yesterday a pull
request was merged to convert between milliseconds and date, while here you
want to go from seconds to date.
Converters are nice, but when there are multiple ones that can handle a
certain conversion, you can never know which one is picked at runtime
(classpath order depenent).
Maybe this patch should try to contain the conversion code inside the
postgis module, or make it so that the converter in question gets
enabled (and prioritized?) when specific hints are passed down?
Thinking out loud, given that postgresql has extensible type system and
you're free to define your own custom domains, it would be cool to have
some interface that one can implement to
add custom type handling, without having to modify directly dialects and
sql encoders. This may have expand scope a lot of course, and overkill to
support just a single domain,
so don't take me too seriously here.
Cheers
Andrea
--
==
GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.
==
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
*AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*
Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.
The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.
-------------------------------------------------------
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel