pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedinserting values into arrays
6+ messages / 4 participants
[nested] [flat]
* inserting values into arrays
@ 2000-01-20 08:16 T.I.P. <tip@pc10.radnoti-szeged.sulinet.hu>
0 siblings, 0 replies; 6+ messages in thread
From: T.I.P. @ 2000-01-20 08:16 UTC (permalink / raw)
To: pgsql-sql
I unsubscribed pgsql-sql for some days, so I don't know whether this
problem is reported already or not.
I am trying to write a function for making group and user creation
easier. I would like to insert a new value after the existing ones in the
field "grolist" in the table "pg_group".
I tried a few solutions without success:
a) Defining a variable in a plpgsql function with type _int4. But
the command SELECT INTO refused to take the array up. Or, if I can do
this, how can I append a row after the others?
b) The other idea was to get the values step by step from the array,
making a varchar type variable with the values and the other neccessary
punctuation ("{", "'", ",", "}"), and then perform an update on the right
row of pg_group. But I realized that there is no varchar->_int4 converter
in Postgres yet, unfortunately.
The strange thing is that I can do almost everything by typing the queries
across the psql frontend, but from functions nothing (I think it is due to
there is no varchar->_int4 conversion) .
What should I do?
Thanks in advice,
Kovacs, Zoltan
^ permalink raw reply [nested|flat] 6+ messages in thread
* [SQL] inserting values into arrays
@ 2000-01-20 09:19 T.I.P. <tip@pc10.radnoti-szeged.sulinet.hu>
0 siblings, 0 replies; 6+ messages in thread
From: T.I.P. @ 2000-01-20 09:19 UTC (permalink / raw)
To: pgsql-sql
(This is a resent mail, sorry, if you have already read it.)
I unsubscribed pgsql-sql for some days, so I don't know whether this
problem is reported already or not.
I am trying to write a function for making group and user creation
easier. I would like to insert a new value after the existing ones in the
field "grolist" in the table "pg_group".
I tried a few solutions without success:
a) Defining a variable in a plpgsql function with type _int4. But
the command SELECT INTO refused to take the array up. Or, if I can do
this, how can I append a row after the others?
b) The other idea was to get the values step by step from the array,
making a varchar type variable with the values and the other neccessary
punctuation ("{", "'", ",", "}"), and then perform an update on the right
row of pg_group. But I realized that there is no varchar->_int4 converter
in Postgres yet, unfortunately.
The strange thing is that I can do almost everything by typing the queries
across the psql frontend, but from functions nothing (I think it is due to
there is no varchar->_int4 conversion) .
What should I do?
Thanks in advice,
Kovacs, Zoltan
^ permalink raw reply [nested|flat] 6+ messages in thread
* inserting values into arrays
@ 2000-01-20 09:27 Kovacs Zoltan <kovacsz@pc10.radnoti-szeged.sulinet.hu>
0 siblings, 0 replies; 6+ messages in thread
From: Kovacs Zoltan @ 2000-01-20 09:27 UTC (permalink / raw)
To: pgsql-sql
Hi,
I unsubscribed pgsql-sql for some days, so I don't know whether this
problem is reported already or not.
I am trying to write a function for making group and user creation
easier. I would like to insert a new value after the existing ones in the
field "grolist" in the table "pg_group".
I tried a few solutions without success:
a) Defining a variable in a plpgsql function with type _int4. But
the command SELECT INTO refused to take the array up. Or, if I can do
this, how can I append a row after the others?
b) The other idea was to get the values step by step from the array,
making a varchar type variable with the values and the other neccessary
punctuation ("{", "'", ",", "}"), and then perform an update on the right
row of pg_group. But I realized that there is no varchar->_int4 converter
in Postgres yet, unfortunately.
The strange thing is that I can do almost everything by typing the queries
across the psql frontend, but from functions nothing (I think it is due to
there is no varchar->_int4 conversion) .
What should I do?
Thanks in advice,
Zoltan
Kov\'acs, Zolt\'an
kovacsz@pc10.radnoti-szeged.sulinet.hu
http://www.math.u-szeged.hu/~kovzol
ftp://pc10.radnoti-szeged.sulinet.hu/home/kovacsz
^ permalink raw reply [nested|flat] 6+ messages in thread
* inserting values into arrays
@ 2000-01-20 12:30 Kovacs Zoltan <kovzol@sol.cc.u-szeged.hu>
0 siblings, 0 replies; 6+ messages in thread
From: Kovacs Zoltan @ 2000-01-20 12:30 UTC (permalink / raw)
To: pgsql-sql; +Cc: pgsql-sql@hub.org
Hi,
I unsubscribed pgsql-sql for some days, so I don't know whether this
problem is reported already or not.
I am trying to write a function for making group and user creation
easier. I would like to insert a new value after the existing ones in the
field "grolist" in the table "pg_group".
I tried a few solutions without success:
a) Defining a variable in a plpgsql function with type _int4. But
the command SELECT INTO refused to take the array up. Or, if I can do
this, how can I append a row after the others?
b) The other idea was to get the values step by step from the array,
making a varchar type variable with the values and the other neccessary
punctuation ("{", "'", ",", "}"), and then perform an update on the right
row of pg_group. But I realized that there is no varchar->_int4 converter
in Postgres yet, unfortunately.
The strange thing is that I can do almost everything by typing the queries
across the psql frontend, but from functions nothing (I think it is due to
there is no varchar->_int4 conversion) .
What should I do?
Thanks in advice,
Zoltan
Kov\'acs, Zolt\'an
kovacsz@pc10.radnoti-szeged.sulinet.hu
http://www.math.u-szeged.hu/~kovzol
ftp://pc10.radnoti-szeged.sulinet.hu/home/kovacsz
^ permalink raw reply [nested|flat] 6+ messages in thread
* inserting values into arrays
@ 2000-01-20 13:07 T.I.P. <tip@pc10.radnoti-szeged.sulinet.hu>
0 siblings, 0 replies; 6+ messages in thread
From: T.I.P. @ 2000-01-20 13:07 UTC (permalink / raw)
To: pgsql-sql
(I sent this mail to a few list members already. Sorry, if you are one of
them, too.)
I unsubscribed pgsql-sql for some days, so I don't know whether this
problem is reported already or not.
I am trying to write a function for making group and user creation
easier. I would like to insert a new value after the existing ones in the
field "grolist" in the table "pg_group".
I tried a few solutions without success:
a) Defining a variable in a plpgsql function with type _int4. But
the command SELECT INTO refused to take the array up. Or, if I can do
this, how can I append a row after the others?
b) The other idea was to get the values step by step from the array,
making a varchar type variable with the values and the other neccessary
punctuation ("{", "'", ",", "}"), and then perform an update on the right
row of pg_group. But I realized that there is no varchar->_int4 converter
in Postgres yet, unfortunately.
The strange thing is that I can do almost everything by typing the queries
across the psql frontend, but from functions nothing (I think it is due to
there is no varchar->_int4 conversion) .
What should I do?
Thanks in advice,
Kovacs, Zoltan
^ permalink raw reply [nested|flat] 6+ messages in thread
* inserting values into arrays
@ 2000-01-20 15:24 Thomas Lockhart <lockhart@alumni.caltech.edu>
0 siblings, 0 replies; 6+ messages in thread
From: Thomas Lockhart @ 2000-01-20 15:24 UTC (permalink / raw)
To: Kovacs Zoltan <kovacsz@pc10.radnoti-szeged.sulinet.hu>; pgsql-sql
(Message from Zoltan Kovacs; note to Zoltan: try subscribing to the
"pgsql-loophole" mailing list, which should let you post to any of the
other lists)
> ---------- Forwarded message ----------
> Date: Thu, 20 Jan 2000 09:16:48 +0100 (CET)
> From: Kovacs Zoltan <kovacsz@pc10.radnoti-szeged.sulinet.hu>
> To: pgsql-sql@postgresql.org
> Subject: inserting values into arrays
>
> I unsubscribed pgsql-sql for some days, so I don't know whether this
> problem is reported already or not.
>
> I am trying to write a function for making group and user creation
> easier. I would like to insert a new value after the existing ones in the
> field "grolist" in the table "pg_group".
>
> I tried a few solutions without success:
>
> a) Defining a variable in a plpgsql function with type _int4. But
> the command SELECT INTO refused to take the array up. Or, if I can do
> this, how can I append a row after the others?
>
> b) The other idea was to get the values step by step from the array,
> making a varchar type variable with the values and the other neccessary
> punctuation ("{", "'", ",", "}"), and then perform an update on the right
> row of pg_group. But I realized that there is no varchar->_int4 converter
> in Postgres yet, unfortunately.
>
> The strange thing is that I can do almost everything by typing the queries
> across the psql frontend, but from functions nothing (I think it is due to
> there is no varchar->_int4 conversion) .
>
> What should I do?
>
> Thanks in advice,
> Kovacs, Zoltan
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2000-01-20 15:24 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-01-20 08:16 inserting values into arrays T.I.P. <tip@pc10.radnoti-szeged.sulinet.hu>
2000-01-20 09:19 [SQL] inserting values into arrays T.I.P. <tip@pc10.radnoti-szeged.sulinet.hu>
2000-01-20 09:27 inserting values into arrays Kovacs Zoltan <kovacsz@pc10.radnoti-szeged.sulinet.hu>
2000-01-20 12:30 inserting values into arrays Kovacs Zoltan <kovzol@sol.cc.u-szeged.hu>
2000-01-20 13:07 inserting values into arrays T.I.P. <tip@pc10.radnoti-szeged.sulinet.hu>
2000-01-20 15:24 inserting values into arrays Thomas Lockhart <lockhart@alumni.caltech.edu>
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