Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- FUNCTION: public.nomes1()
- -- DROP FUNCTION IF EXISTS public.nomes1();
- CREATE OR REPLACE FUNCTION public.nomes1(
- )
- RETURNS text
- LANGUAGE 'plpgsql'
- COST 50
- VOLATILE LEAKPROOF PARALLEL UNSAFE
- AS $BODY$
- DECLARE
- vretorno TEXT;
- BEGIN
- SELECT
- initcap(string_agg(x,'')) INTO vretorno
- FROM (
- select start_arr[ 1 + ( (random() * 25)::int) % 31 ]
- FROM
- (
- select '{ro,re,pi,co,jho,bo,ba,ja,mi,pe,da,an,en,sy,vir,nath,so,mo,aĆÆ,che,cha,dia,n,nn,hn,b,t,gh,ri,hen,ng}'::text[] as start_arr
- ) syllarr,
- -- need 3 syllabes, and force generator interpretation with the '*0' (else 3 same syllabes)
- generate_series(1, 3 +1)
- ) AS con_name_first(x);
- RETURN vretorno;
- END;
- $BODY$;
- ALTER FUNCTION public.nomes1()
- OWNER TO postgres;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement