Merkel Marcel wrote: > I try to extract geometric data types from a postgre DB (7.4) with > libpqxx. But I do not have much success. I'd like to get the four > floating points which formed the box as integers. However I don't know > how I can extract these four points from the result::field. It looks to > me like it is a string. I could parse the string myself but I'm sure > there is a better solution for that.
I'm afraid there isn't! Arrays are not supported in libpqxx yet. Floating-point values are, for what it's worth, but you'll have to extract them from the array representation first. > I solved a similar problem with the point data type by modifying the > query : > SELECT point[0], point[1] FROM .., gives me the two floats in seperate > columns. But the same trick does not work for the box type. In that case > I get two columns of type point. I tried SELECT box[0][0] FROM ... to > get one value of the box as a single column but that doesn't work. That's a creative approach... Why doesn't it work? I haven't worked with arrays in postgres yet, so I don't know much about them. Jeroen _______________________________________________ Libpqxx-general mailing list [email protected] http://gborg.postgresql.org/mailman/listinfo/libpqxx-general
