Re: [GENERAL] Function - Mailing list pgsql-general

From Raymond O'Donnell
Subject Re: [GENERAL] Function
Date
Msg-id 28fec67f-5e63-7a8d-c876-6a07dce38ff6@iol.ie
Whole thread Raw
In response to [GENERAL] Function  (Marcio Farah <marciofarah@gmail.com>)
List pgsql-general
On 26/10/17 15:00, Marcio Farah wrote:
> Good morning for all
> 
> I´m beginer in PL/pgSQL functions and I have one difficulty. The 
> function bellow should return many records but return just one. The loop 
> just do the first INSERT INTO and get out.


If you run
  SELECT substring(cd_geocmu,1,6)::int AS cod_mun FROM  geo_politico.g_br_municipios  WHERE
substring(cd_geocmu,1,2)::int= num
 

by itself (with a suitable value of "num"), do you get more than one row?

Also, what is the definition of the function 
parametros.calcula_parametros()?

Ray.

-- 
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

pgsql-general by date:

Previous
From: Francisco Olarte
Date:
Subject: Re: [GENERAL] Question regarding logical replication
Next
From: Weiping Qu
Date:
Subject: Re: [GENERAL] Question regarding logical replication