From shavonne.marietta@studioform.it Fri Oct 14 12:48:09 2005 X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id AA3BDD9028 for ; Fri, 14 Oct 2005 09:48:09 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 81573-05 for ; Fri, 14 Oct 2005 12:48:04 +0000 (GMT) Received: from smtpout07.attiva.biz (smtpout07.attiva.biz [85.37.16.5]) by svr1.postgresql.org (Postfix) with ESMTP id 08A05D8CE2 for ; Fri, 14 Oct 2005 09:48:05 -0300 (ADT) Received: from FBCMFE02B08.fbc.local ([192.168.30.96]) by smtpout07.attiva.biz with Microsoft SMTPSVC(6.0.3790.211); Fri, 14 Oct 2005 14:48:56 +0200 Received: from dream ([81.74.60.30]) by FBCMFE02B08.fbc.local with Microsoft SMTPSVC(6.0.3790.211); Fri, 14 Oct 2005 14:48:40 +0200 Message-ID: <002801c5d0bd$7e640e50$1102a8c0@dream> Reply-To: "Shavonne Marietta Wijesinghe" From: "Shavonne Marietta Wijesinghe" To: Subject: sql function Date: Fri, 14 Oct 2005 14:47:53 +0200 Organization: Studio FORM MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0025_01C5D0CE.41A7BF00" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-OriginalArrivalTime: 14 Oct 2005 12:48:41.0091 (UTC) FILETIME=[9A96FD30:01C5D0BD] X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.391 required=5 tests=[AWL=0.363, HTML_60_70=0.027, HTML_MESSAGE=0.001] X-Spam-Level: X-Archive-Number: 200510/161 X-Sequence-Number: 23014 This is a multi-part message in MIME format. ------=_NextPart_000_0025_01C5D0CE.41A7BF00 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I have 2 schemas "operativo" and "autore" and they both have a table = "PECDT00"=20 i want to create a function with the following sql command (using the = programme pgadmin 3) in pgadmin 3 there is a small wizard to fill when u = create a function and u have to add the return type.. this is the sql statement i wanna do DELETE FROM operativo.PECDT00;=20 insert into operativo.PECDT00 (select * from autore.PECDT00); what can i use ad the return type?? thank u =20 ------=_NextPart_000_0025_01C5D0CE.41A7BF00 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
I have 2 schemas "operativo" and "autore" and they both have a table "PECDT00"=20
 
i want to create a function with the = following sql=20 command (using the programme pgadmin 3) in pgadmin 3 there is a small = wizard to=20 fill when u create a function and u have to add the return = type..
 
this is the sql statement i wanna = do
 
DELETE FROM operativo.PECDT00; =
insert into=20 operativo.PECDT00 (select * from autore.PECDT00);
 
what can i use ad the return = type??
 
thank u

 

------=_NextPart_000_0025_01C5D0CE.41A7BF00-- From akretschmer@spamfence.net Fri Oct 14 13:14:10 2005 X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 5A957D93DF for ; Fri, 14 Oct 2005 10:14:10 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 86912-03 for ; Fri, 14 Oct 2005 13:14:06 +0000 (GMT) Received: from 137086.vserver.de (vs137086.vserver.de [62.75.137.86]) by svr1.postgresql.org (Postfix) with ESMTP id 193B3D91A5 for ; Fri, 14 Oct 2005 10:14:07 -0300 (ADT) Received: from a-kretschmer.de (p54B3BFCC.dip0.t-ipconnect.de [84.179.191.204]) (authenticated bits=0) by 137086.vserver.de (8.12.8/8.12.8) with ESMTP id j9EDE9rM011808 for ; Fri, 14 Oct 2005 15:14:09 +0200 Received: from kretschmer by a-kretschmer.de with local (Exim 3.36 #1) id 1EQPRz-0000gY-00 for pgsql-sql@postgresql.org; Fri, 14 Oct 2005 15:18:19 +0200 Date: Fri, 14 Oct 2005 15:18:19 +0200 From: Andreas Kretschmer To: pgsql-sql@postgresql.org Subject: Re: sql function Message-ID: <20051014131818.GA2562@kaufbach.delug.de> References: <002801c5d0bd$7e640e50$1102a8c0@dream> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <002801c5d0bd$7e640e50$1102a8c0@dream> X-OS: Debian/GNU Linux - weil ich es mir Wert bin! X-GPG-Fingerprint: EE16 3C01 7B9C 10F7 2C8B 3B86 4DB3 D9EE 7F45 84DA X-Message-Flag: "Windows" is not the answer. "Windows" is the question and the answer is "no"! X-Lugdd: Gerd Kube X-Info: My name is root. Just root. And I am licensed to kill -9 User-Agent: mutt-ng 1.5.9i (Linux) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.05 required=5 tests=[FORGED_RCVD_HELO=0.05] X-Spam-Level: X-Archive-Number: 200510/162 X-Sequence-Number: 23015 Shavonne Marietta Wijesinghe schrieb: > I have 2 schemas "operativo" and "autore" and they both have a table "PECDT00" > > i want to create a function with the following sql command (using the programme > pgadmin 3) in pgadmin 3 there is a small wizard to fill when u create a > function and u have to add the return type.. > > this is the sql statement i wanna do > > DELETE FROM operativo.PECDT00; > insert into operativo.PECDT00 (select * from autore.PECDT00); > > what can i use ad the return type?? Simple. Open a new text file: ,----[ store this as table_copy.sql ] | create or replace function table_copy() returns void as $$ | delete from operative.PECDT00; | insert into operativo.PECDT00 select * from autore.PECDT00; | $$ language sql; `---- Now call psql with your Database. ,----[ log from psql ] | test=>\i table_copy.sql | CREATE FUNCTION | | test=> select table_copy(); | table_copy | ------------ | | (1 Zeile) `---- I say it again: use the fine command line tool psql to learn SQL. Regards, Andreas -- Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect. (Linus Torvalds) Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889° From ashokexplorer@gmail.com Mon Aug 27 12:12:17 2007 Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id B80A79F9D62 for ; Mon, 27 Aug 2007 09:12:17 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 87177-02 for ; Mon, 27 Aug 2007 09:12:08 -0300 (ADT) X-Greylist: delayed 00:06:50.215943 by SQLgrey-1.7.5 Received: from el-out-1112.google.com (el-out-1112.google.com [209.85.162.177]) by postgresql.org (Postfix) with ESMTP id A55099F9D36 for ; Mon, 27 Aug 2007 09:12:13 -0300 (ADT) Received: by el-out-1112.google.com with SMTP id m34so256358ele for ; Mon, 27 Aug 2007 05:12:12 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; b=YoFaRnVG9490v15e76sXtw63wbwLmdgLagOIwMiTMSUPhgb1UzbChQhnc/76AxUmDOzjcBZWcwRr6AsWBeW4tQs9r1AIGQfeuDDm+ilO/b/mBZ8ILaAC8VHtdmGVIF5tuntdZ9mSJYOExd7hNeCZc3OlqT8aaujH/gxkkb2CB8I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=m4f7uL8lLSW8Nvzk3j+1+V6gZ1DtG+1XVDsx2POn/RUX7boWYZBL6rXebc/UaTybNVR2Xv/gVHxa6XW3ImKbNU2isE2UhGK4cmBbNMpfJxx0RqwWaNn+FYQAGX9UmqwUqqYukdqkhB/YqArsQrVLoN5bHIIVfayMYyxdbdyWaVY= Received: by 10.114.166.1 with SMTP id o1mr3739643wae.1188216320804; Mon, 27 Aug 2007 05:05:20 -0700 (PDT) Received: by 10.114.60.13 with HTTP; Mon, 27 Aug 2007 05:05:20 -0700 (PDT) Message-ID: <399c75c20708270505g667c16c2o44f795144a7f736d@mail.gmail.com> Date: Mon, 27 Aug 2007 17:35:20 +0530 From: "ashok raj" To: pgsql-sql@postgresql.org Subject: SQL function MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_164390_33220848.1188216320740" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200708/216 X-Sequence-Number: 29154 ------=_Part_164390_33220848.1188216320740 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, Is there any function in postgre to know the size of the data in a row of a table ? ------=_Part_164390_33220848.1188216320740 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi,
       Is there any function in postgre to know the size of the data in a row of a table ?




------=_Part_164390_33220848.1188216320740--