Artis Caune wrote:
Thanks a lot!
Normal upper/lower loop works fine:
CREATE OR REPLACE FUNCTION add_user( VARCHAR(128)[] ) RETURNS SMALLINT
I'd rename the function "add_users()"
AS $$
DECLARE
v_uid SMALLINT;
v_low SMALLINT;
v_upp SMALLINT;
empty BOOLEAN := TRUE;
BEGIN
SELECT INTO
Thanks a lot!
Normal upper/lower loop works fine:
CREATE OR REPLACE FUNCTION add_user( VARCHAR(128)[] ) RETURNS SMALLINT AS $$
DECLARE
v_uid SMALLINT;
v_low SMALLINT;
v_upp SMALLINT;
empty BOOLEAN := TRUE;
BEGIN
SELECT INTO v_low array_lower($1,1);
SELECT INTO v_upp array_upper($1,1)
Artis Caune wrote:
I'm trying to write function which accept array and insert each element
in table:
=# SELECT * FROM add_user('[EMAIL PROTECTED], [EMAIL PROTECTED]');
ERROR: column "email" is of type character varying but expression is
of type record
HINT: You will need t
I'm trying to write function which accept array and insert each element
in table:
=# SELECT * FROM add_user('[EMAIL PROTECTED], [EMAIL PROTECTED]');
ERROR: column "email" is of type character varying but expression is
of type record
HINT: You will need to rewrite or cast th