From: | ALİ ÇELİK <ali(at)alicelik(dot)com(dot)tr> |
---|---|
To: | "'Osman_efe'" <osman_efe(at)yahoo(dot)com>, "'Mustafa Karakaplan'" <mkarakaplan(at)inonu(dot)edu(dot)tr>, <pgsql-tr-genel(at)postgresql(dot)org> |
Subject: | Re: plpgsql ile ilgili bir ornek lazim. |
Date: | 2007-09-28 10:51:19 |
Message-ID: | 001b01c801bd$804e4900$0301a8c0@ALIPC |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-tr-genel |
Merhaba
CREATE OR REPLACE FUNCTION "public"."testfunction" (integer) RETURNS SETOF "public"."testtype" AS
$body$
select a,b,c from datatable where id=$1
$body$
LANGUAGE 'sql' STABLE CALLED ON NULL INPUT SECURITY INVOKER;
CREATE TYPE "public"."testtype" AS (
"a" VARCHAR,
"b" INTEGER,
"c” NUMERIC
);
Ali ÇELİK
_____
From: pgsql-tr-genel-owner(at)postgresql(dot)org [mailto:pgsql-tr-genel-owner(at)postgresql(dot)org] On Behalf Of Osman_efe
Sent: Friday, September 28, 2007 10:07 AM
To: Mustafa Karakaplan; pgsql-tr-genel(at)postgresql(dot)org
Subject: Re: [pgsql-tr-genel] plpgsql ile ilgili bir ornek lazim.
Merhaba,
"type" kullanımı sorununuzu çözer . Dönmesini istediğiniz alanları type içerisinde tanımlayıp daha sonra fonksiyonunuz içerisinde de bu type tipini gösterip(tanımlayıp) istediğiniz şekilde sonuç alabilirsiniz.
Mustafa Karakaplan <mkarakaplan(at)inonu(dot)edu(dot)tr> wrote:
Selamlar
select personel_bilgi(4145);
sekline bir fonksiyon cagirdigimda donusun birden fazla kayitla donmesini istiyorum.
sql dili olarak yazdigim bir fonksiyondan donus asagidaki sekilde oluyor ama ben bunu
istemiyorum.
(456632,66.448.155,Mustafa,Karakaplan,0616)
Istemci tarafinda bunlari ayirmakla ugrasmak istemiyorum.
fonksiyon plpgsql ile yazmaliyim ve sonuc
456632 | 66.448.155 | Mustafa | Karakaplan | 0616
seklinde donsun istiyorum.
Bu konuda ornek lazim.
Yardimlariniz icin tesekkurler.
adresine yollayabilirsiniz.
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
_____
Shape Yahoo! in your own image. Join <http://us.rd.yahoo.com/evt=48517/*http:/surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7> our Network Research Panel today!
From | Date | Subject | |
---|---|---|---|
Next Message | Adnan DURSUN | 2007-09-28 23:38:33 | Re: plpgsql ile ilgili bir ornek lazim. |
Previous Message | Osman_efe | 2007-09-28 07:06:43 | Re: plpgsql ile ilgili bir ornek lazim. |