pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedhow to get the size of array?
2+ messages / 2 participants
[nested] [flat]
* how to get the size of array?
@ 2006-03-14 20:48 Emi Lu <emilu@encs.concordia.ca>
2006-03-14 20:54 ` Re: how to get the size of array? Andreas Kretschmer <akretschmer@spamfence.net>
0 siblings, 1 reply; 2+ messages in thread
From: Emi Lu @ 2006-03-14 20:48 UTC (permalink / raw)
To: pgsql-sql
Hello,
Is there a way that I can get the size of one array ?
For example, create table test (id varchar[]);
insert into test values('{}');
insert into test values('{1, 2, 3}');
I am looking for something like :
select sizeOf(id) as size from test;
so that I can get results like:
size
-------
0
3
Thanks a lot,
Ying
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: how to get the size of array?
2006-03-14 20:48 how to get the size of array? Emi Lu <emilu@encs.concordia.ca>
@ 2006-03-14 20:54 ` Andreas Kretschmer <akretschmer@spamfence.net>
0 siblings, 0 replies; 2+ messages in thread
From: Andreas Kretschmer @ 2006-03-14 20:54 UTC (permalink / raw)
To: pgsql-sql
Emi Lu <emilu@encs.concordia.ca> schrieb:
> Hello,
>
> Is there a way that I can get the size of one array ?
Yes: http://www.postgresql.org/docs/8.1/interactive/functions-array.html
HTH, Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly." (unknow)
Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2006-03-14 20:54 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-03-14 20:48 how to get the size of array? Emi Lu <emilu@encs.concordia.ca>
2006-03-14 20:54 ` Andreas Kretschmer <akretschmer@spamfence.net>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox