Lists: | pgsql-hackerspgsql-sql |
---|
From: | Larry Rosenman <ler(at)lerctr(dot)org> |
---|---|
To: | pgsql-hackers(at)hub(dot)org, pgsql-sql(at)hub(dot)org |
Subject: | 7.0.2: Arrays |
Date: | 2000-09-05 19:56:30 |
Message-ID: | 20000905145630.A19424@lerami.lerctr.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers pgsql-sql |
Greetings,
I was trying to use arrays today, and can't seem to get it right.
What am I doing wrong?
ler=# create table ia_standby (hsrp_group int2,
ler(# router_interfaces[] varchar(64),
ler(# routers[] varchar(64));
ERROR: parser: parse error at or near "["
ler=# create table ia_standby (hsrp_group int2,
ler(# router_interfaces[] text,
ler(# routers[] text);
ERROR: parser: parse error at or near "["
ler=#
--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 (voice) Internet: ler(at)lerctr(dot)org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749
From: | Kristofer Munn <kmunn(at)munn(dot)com> |
---|---|
To: | Larry Rosenman <ler(at)lerctr(dot)org> |
Cc: | pgsql-hackers(at)hub(dot)org, pgsql-sql(at)hub(dot)org |
Subject: | Re: [HACKERS] 7.0.2: Arrays |
Date: | 2000-09-05 20:22:39 |
Message-ID: | Pine.LNX.4.10.10009051621560.6691-100000@munn.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers pgsql-sql |
On Tue, 5 Sep 2000, Larry Rosenman wrote:
> Greetings,
> I was trying to use arrays today, and can't seem to get it right.
>
> What am I doing wrong?
>
> ler=# create table ia_standby (hsrp_group int2,
> ler(# router_interfaces[] varchar(64),
> ler(# routers[] varchar(64));
What you want to do is...
create table ia_standby (
hsrp_group int2,
router_interfaces varchar(64)[],
routers varchar(64)[]
);
- K
Kristofer Munn * KMI * 732-254-9305 * AIM KrMunn * http://www.munn.com/
From: | Larry Rosenman <ler(at)lerctr(dot)org> |
---|---|
To: | Kristofer Munn <kmunn(at)munn(dot)com> |
Cc: | pgsql-hackers(at)hub(dot)org, pgsql-sql(at)hub(dot)org |
Subject: | Re: [HACKERS] 7.0.2: Arrays |
Date: | 2000-09-05 20:30:20 |
Message-ID: | 20000905153020.A20508@lerami.lerctr.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers pgsql-sql |
Ok, so I can't read. Thanks!
LER
* Kristofer Munn <kmunn(at)munn(dot)com> [000905 15:27]:
> On Tue, 5 Sep 2000, Larry Rosenman wrote:
>
> > Greetings,
> > I was trying to use arrays today, and can't seem to get it right.
> >
> > What am I doing wrong?
> >
> > ler=# create table ia_standby (hsrp_group int2,
> > ler(# router_interfaces[] varchar(64),
> > ler(# routers[] varchar(64));
>
> What you want to do is...
>
> create table ia_standby (
> hsrp_group int2,
> router_interfaces varchar(64)[],
> routers varchar(64)[]
> );
>
> - K
>
> Kristofer Munn * KMI * 732-254-9305 * AIM KrMunn * http://www.munn.com/
--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 (voice) Internet: ler(at)lerctr(dot)org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749
From: | Jie Liang <jliang(at)ipinc(dot)com> |
---|---|
To: | Larry Rosenman <ler(at)lerctr(dot)org> |
Cc: | pgsql-hackers(at)hub(dot)org, pgsql-sql(at)hub(dot)org |
Subject: | Re: 7.0.2: Arrays |
Date: | 2000-09-05 20:38:47 |
Message-ID: | 39B559D7.FE4E215D@ipinc.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers pgsql-sql |
Hi, there
Your syntax is not correct, pls check the Pg documentatation, the
correction as following.
Larry Rosenman wrote:
> Greetings,
> I was trying to use arrays today, and can't seem to get it right.
>
> What am I doing wrong?
>
> ler=# create table ia_standby (hsrp_group int2,
> ler(# router_interfaces[] varchar(64),
==>router_interfaces varchar(64)[],
>
> ler(# routers[] varchar(64));
> ERROR: parser: parse error at or near "["
> ler=# create table ia_standby (hsrp_group int2,
> ler(# router_interfaces[] text,
==>router_interfaces text[],
>
> ler(# routers[] text);
> ERROR: parser: parse error at or near "["
> ler=#
>
> --
> Larry Rosenman http://www.lerctr.org/~ler
> Phone: +1 972-414-9812 (voice) Internet: ler(at)lerctr(dot)org
> US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749
--
Jie LIANG
Internet Products Inc.
10350 Science Center Drive
Suite 100, San Diego, CA 92121
Office:(858)320-4873
jliang(at)ipinc(dot)com
www.ipinc.com