Timestamp values are mapped 8 bytes long on Postgresql #8
Timestamp values are mapped 8 bytes long on Postgresql #8brbza wants to merge 1 commit intopbrumm:masterfrom
Conversation
|
We use mainly 9.2 with some 9.3. Let me check compatibility, I may need to add a flag to the encoder if this doesn't work on all of them. |
|
to help me test this. could you go into a psql prompt and run the following and then send me the timestamp_test.dat file so I can run add a spec to test your example. are you using the same column type as above? http://www.postgresql.org/docs/9.3/static/datatype-datetime.html |
|
I just did the above on a 9.3 postgres and my export is equivalent. and it is exporting it as 8bit. I also don't see a difference in the output between L!> and Q!>. |
|
Hi Pete, Sorry for the delay on this answer... As described on Postgresql documentation, timestamp with or without time Lookin into the Array Class documentation for the pack method ( C | Integer | 8-bit unsigned (unsigned char) Note that the Q directive is available for older versions of Ruby too, just So, if we use pack with "L!>", "L", "L>", "L!<" or any other L directive we We can test it using irb and running part of the gem code: 2.1.2 :001 > field = Time.now
even using just "Q>" we get the same result, I don't know if we need the 2.1.2 :024 > buf = [(field.to_f * 1_000_000 - Maybe is something related with the version of Ruby, I'm using ruby If you still need the binary export from postgresql I can provide you, that Best Regards, Carlos On Tue, Dec 2, 2014 at 8:38 PM, Pete Brumm notifications@github.com wrote:
|
No description provided.