pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Lockhart <lockhart@alumni.caltech.edu>
To: Kovacs Zoltan <kovacsz@pc10.radnoti-szeged.sulinet.hu>
To: pgsql-sql@postgresql.org
Subject: inserting values into arrays
Date: Thu, 20 Jan 2000 15:24:17 +0000
Message-ID: <388728A1.25C98138@alumni.caltech.edu> (raw)
References: <Pine.LNX.4.05.10001201130310.437-100000@pc10.radnoti-szeged.sulinet.hu>

(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



view thread (6+ messages)

Message-ID: <388728A1.25C98138@alumni.caltech.edu>
Permalink:  ../388728A1.25C98138@alumni.caltech.edu/
Also on:    postgresql.org/message-id/388728A1.25C98138@alumni.caltech.edu

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: lockhart@alumni.caltech.edu, kovacsz@pc10.radnoti-szeged.sulinet.hu
  Subject: Re: inserting values into arrays
  In-Reply-To: <388728A1.25C98138@alumni.caltech.edu>
  References: <Pine.LNX.4.05.10001201130310.437-100000@pc10.radnoti-szeged.sulinet.hu> <388728A1.25C98138@alumni.caltech.edu>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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