From: | Jeff Hamann <jeff(dot)d(dot)hamann(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | printing vector column seems to print the rest of the row too |
Date: | 2010-07-20 21:59:01 |
Message-ID: | DA7968A5-ED53-48C4-AB44-5183A2E7484A@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I'm sorry if this not the appropriate place for this post, but I couldn't figure out where to put this and I didn't see anything online so far...
I've been prototyping a small database, with the following table definition:
drop table if exists tradeprices cascade;
create table tradeprices (
universedate date not null,
tradetimestamp timestamp not null,
tradeprice real[] not null,
primary key (universedate,tradetimestamp)
);
When I insert the following row,
insert into tradeprices (universedate,tradetimestamp,tradeprice) values ('2010-07-20','2010-07-20 14:31:02','{1076.09,84.1199,100.21,95.74,107.2822,105.2657,11.67,53.75,40.04,61.41,68.176,71.13,39.85,59.41,61.66,63.32,38.92,83.46,49.03,48.6999,108.21,34.18,54.1901,73.52,54.94,40.17,17.35,51.7,42,43.0195,52.419,41.7,41.8,55.57,35.14,28.31,19.17,18.0608,34.2}');
The results are printed as:
select universedate,tradetimestamp,tradeprices from tradeprices where date(tradetimestamp) = CURRENT_DATE order by tradetimestamp desc;
-[ RECORD 1 ]--+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
universedate | 2010-07-20
tradetimestamp | 2010-07-20 11:10:44
tradeprices | (2010-07-20,"2010-07-20 11:10:44","{1076.09,84.1199,100.21,95.74,107.282,105.266,11.67,53.75,40.04,61.41,68.176,71.13,39.85,59.41,61.66,63.32,38.92,83.46,49.03,48.6999,108.21,34.18,54.1901,73.52,54.94,40.17,17.35,51.7,42,43.0195,52.419,41.7,41.8,55.57,35.14,28.31,19.17,18.0608,34.2}")
where the "tradeprices" vector contains, in the print output only, the values of the previous columns in the row (see the first two elements of the tradeprices vector).
I've tried connecting to the database and retrieved to test connections using psql, ODBC drivers, RPostgreSQL, etc. and the results come back, depending on the client.
I was originally working with 8.3, and have only recently updated to 8.4
Is this a bug, or something that I'm not doing correctly, or both?
Respectfully,
Jeff.
Jeff Hamann
jeff(dot)d(dot)hamann(at)gmail(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2010-07-20 22:06:48 | Re: printing vector column seems to print the rest of the row too |
Previous Message | Merlin Moncure | 2010-07-20 20:59:57 | Re: check_postgres reports most of my tables are unanalyzed for 8 weeks; why isn't autovacuum analyzing them? |