On Mon, 31 Oct 2011 09:41:40 -0500
Merlin Moncure wrote:
>On Mon, Oct 31, 2011 at 8:31 AM, Tarlika Elisabeth Schmitz
> wrote:
>> I have created a function log_insert(), which is simply a shorthand
>> for an INSERT table and which I want to call from various trigger
>> functions.
>>
>> CREATE OR R
2011/10/31 Merlin Moncure :
> On Mon, Oct 31, 2011 at 8:31 AM, Tarlika Elisabeth Schmitz
> wrote:
>> I have created a function log_insert(), which is simply a shorthand for
>> an INSERT table and which I want to call from various trigger functions.
>>
>> CREATE OR REPLACE FUNCTION log_insert(vseve
On Mon, Oct 31, 2011 at 8:31 AM, Tarlika Elisabeth Schmitz
wrote:
> I have created a function log_insert(), which is simply a shorthand for
> an INSERT table and which I want to call from various trigger functions.
>
> CREATE OR REPLACE FUNCTION log_insert(vseverity text, vtrigger text,
> vtrigger
I have created a function log_insert(), which is simply a shorthand for
an INSERT table and which I want to call from various trigger functions.
CREATE OR REPLACE FUNCTION log_insert(vseverity text, vtrigger text,
vtriggertable text, vtriggerid text, vmessage text) RETURNS boolean AS
$BODY$
BEGIN
>>From: pgsql-general-ow...@postgresql.org
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Nick Raj
>>Sent: Saturday, June 04, 2011 10:04 AM
>>To: pgsql-general@postgresql.org
>>Subject: [GENERAL] Pl/pgsql function
>>
>>Second thing,
>>Suppos
Nick Raj wrote:
I am implementing some pl/pgsql functions.
Is there any way to change the input
for example- I got some value by $1. I want to modify this value
(means split that value), Can we do this and how?
Second thing,
Suppose i defined a function test as
select test('geom',the_geom,
I am implementing some pl/pgsql functions.
Is there any way to change the input
for example- I got some value by $1. I want to modify this value (means
split that value), Can we do this and how?
Second thing,
Suppose i defined a function test as
select test('geom',the_geom,time) from tablename
.
2008/6/10 Bojan <[EMAIL PROTECTED]>:
> How to invoke function which has arguments declared as type "date"?
>
>
>
> I want to make function which will return a list of all dates between
> starting and ending
>
> date which are two arguments of that function. I tried with:
>
>
>
> select * from foo(
am Tue, dem 10.06.2008, um 18:02:01 +0100 mailte Bojan folgendes:
> How to invoke function which has arguments declared as type ?date??
>
>
>
> I want to make function which will return a list of all dates between starting
> and ending
>
> date which are two arguments of that function. I tri
How to invoke function which has arguments declared as type “date”?
I want to make function which will return a list of all dates between
starting and ending
date which are two arguments of that function. I tried with:
select * from foo(2008-06-01, 2008-06-09)
select * from foo(‘2008-06-
Due to limitations (perceived or real) within my client application I am
trying to return a complex dataset which I am assembling using an expensive
PL/PGSql function which I would like to wrap in a writeable view.
I have written the function as both a row-level function which returns a
RO
On Jan 16, 2008, at 3:41 PM, Colin Wetherbee wrote:
Rajarshi Guha wrote:
Hi, I am trying to write a PL/pgsql function that will take a CUBE
variable (which will be a 1D point) and a double precision variable.
If the input CUBE is defined as
'(x,y,z)'::cube
the function would then return a CU
Rajarshi Guha wrote:
Hi, I am trying to write a PL/pgsql function that will take a CUBE
variable (which will be a 1D point) and a double precision variable.
If the input CUBE is defined as
'(x,y,z)'::cube
the function would then return a CUBE value of the form
'(x+R,y+R,z+R),(x-R,y-R,z-R)'::
Hi, I am trying to write a PL/pgsql function that will take a CUBE
variable (which will be a 1D point) and a double precision variable.
If the input CUBE is defined as
'(x,y,z)'::cube
the function would then return a CUBE value of the form
'(x+R,y+R,z+R),(x-R,y-R,z-R)'::cube
where R is the
w)
Thanks Tom!
--
David
-Original Message-
From: Tom Lane [mailto:[EMAIL PROTECTED]
Sent: Friday, December 16, 2005 3:30 PM
To: Niblett, David A
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] PL/pgSQL Function Help
"Niblett, David A" <[EMAIL PROTECTED]&g
On Fri, Dec 16, 2005 at 03:30:01PM -0500, Tom Lane wrote:
> "Niblett, David A" <[EMAIL PROTECTED]> writes:
> > Is there no way in Postgres that I can simply not return
> > anything so I show zero rows?
>
> Make the function return SETOF myrec not just myrec. Then you
> can return zero or one (or
"Niblett, David A" <[EMAIL PROTECTED]> writes:
> Is there no way in Postgres that I can simply not return
> anything so I show zero rows?
Make the function return SETOF myrec not just myrec. Then you
can return zero or one (or more) myrec's.
regards, tom lane
---
I've got an issue with a plpgsql function and I have not
been able to find any reference to this situation in searching.
I hope that someone can point me in the correct direction.
I'm running v8.0.3 and assuming a test set up of:
-
CREATE TYPE myrec AS (
id int
);
am 29.09.2005, um 20:08:17 +0200 mailte Craig folgendes:
> Hi
>
> What is the best tool for debugging pl/pgsql functions?
> Any suggestions would be appreciated
RAISE NOTICE 'foo %', bar;
Read: http://www.postgresql.org/docs/8.0/static/plpgsql-structure.html
Regards, Andreas
--
Andreas Kretsc
On Thu, Sep 29, 2005 at 08:08:17PM +0200, Craig wrote:
> Hi
>
> What is the best tool for debugging pl/pgsql functions? Any
> suggestions would be appreciated
For now, it's RAISE NOTICE aka "debugging by printf", and I'm
checking out EMS HiTech's debugger, which is part of their toolset.
Hi
What is the best tool for debugging pl/pgsql
functions?
Any suggestions would be appreciated
Thanks
Craig
> > I've made a PL/pgSQL function to validate UPC and EAN barcodes.
> > It works correctly, but is a little ugly.
> > Wondering if any PL/pgSQL experts can offer some suggestions. (I'm
> > new to PL/pgSQL.)
For what it's worth, here's a function I'm using to calculate the checksum of
an EAN barc
Miles Keaton presumably uttered the following on 06/25/05 01:44:
I've made a PL/pgSQL function to validate UPC and EAN barcodes.
It works correctly, but is a little ugly.
Wondering if any PL/pgSQL experts can offer some suggestions. (I'm
new to PL/pgSQL.)
Main questions:
#1 - I wanted to ad
I've made a PL/pgSQL function to validate UPC and EAN barcodes.
It works correctly, but is a little ugly.
Wondering if any PL/pgSQL experts can offer some suggestions. (I'm
new to PL/pgSQL.)
Main questions:
#1 - I wanted to add a "0" to the front of the barcode if it was only
12 characters long
the inquirer <[EMAIL PROTECTED]> writes:
> I am trying to create a function that creates a user
> and adds a row to a table. It produces no warnings or
> errors when I create the function but when I attempt
> to execute it I get a syntax error. I do not
> understand why this is happening.
> CREA
I am trying to create a function that creates a user
and adds a row to a table. It produces no warnings or
errors when I create the function but when I attempt
to execute it I get a syntax error. I do not
understand why this is happening. Any help would be
greatly appreciated.
SELECT create_aut
Hi there,
Does anyone know if out parameters are supported in pl/pgsql functions?
What I mean is something like this:
create function f(out int4) returns text as
'
select $1 = 3
return ""
' language 'plpgsql';
db ==> declare i int4;
db ==> select f(i);
db ==> select i;
i
==
3
27 matches
Mail list logo