In Oracle, there is a type like a growable array, similar Vector at
Java language.
In postgreSQL, is there any type like bellow type?
-CREATE
OR REPLACE PROCEDURE te
Michael Fuhr <[EMAIL PROTECTED]> writes:
> On Fri, Jul 22, 2005 at 03:07:04PM +0530, Gnanavel S wrote:
>> You need to initialse the array, Otherwise any value added to the array will
>> be null.
> This isn't necessary in 8.0, which we can infer is being used because
> of the dollar quotes.
Howeve
On Fri, Jul 22, 2005 at 03:07:04PM +0530, Gnanavel S wrote:
> On 7/22/05, Dongsoo Yoon <[EMAIL PROTECTED]> wrote:
> > CREATE OR REPLACE FUNCTION arr_test()
> > RETURNS NUMERIC[] AS $BODY$
> > DECLARE
> > v_count NUMERIC default 0;
> > v_dayIndex NUMERIC default 0;
> > t_modifiedTimes NUMER
It didn't error out, however the function didn't work. Specificly the if
statement. I took out the if statement and it started updating, I put it
back in and it fails to update. Not sure why. I've confirmed that the
program not attempting to update the stamp_lastupdate field. Here what I
end
Jaime Casanova wrote:
> This seems bad to me also:
>
>>>CREATE FUNCTION session_update() RETURNS trigger AS $session_update$
>>>[..function body..]
>>>$session_update$ LANGUAGE plpgsql;
>
>
> I think it should be:
> CREATE FUNCTION session_update() RETURNS trigger AS $$
> [..function body..]
> $
David Hofmann wrote:
> > I've look throught the docs and from what I can see the bellow code
> > should work, however I keep getting the error:
> >
> > ERROR: parser: parse error at or near "$" at character 53
> >
> > CREATE FUNCTION session_update() RETURNS trigger AS $session_update$
> > BEGIN
I'm using 7.3.
From: Bricklen Anderson <[EMAIL PROTECTED]>
To: David Hofmann <[EMAIL PROTECTED]>
CC: pgsql-sql@postgresql.org
Subject: Re: [SQL] Tigger
Date: Fri, 22 Jul 2005 12:17:41 -0700
David Hofmann wrote:
> I've look throught the docs and from what I can see the bellow code
> should work,
David Hofmann wrote:
> I'm using 7.3.
>
>> From: Bricklen Anderson <[EMAIL PROTECTED]>
>> To: David Hofmann <[EMAIL PROTECTED]>
>> CC: pgsql-sql@postgresql.org
>> Subject: Re: [SQL] Tigger
>> Date: Fri, 22 Jul 2005 12:17:41 -0700
>>
>> David Hofmann wrote:
>> > I've look throught the docs and from
David Hofmann wrote:
> I've look throught the docs and from what I can see the bellow code
> should work, however I keep getting the error:
>
> ERROR: parser: parse error at or near "$" at character 53
>
> CREATE FUNCTION session_update() RETURNS trigger AS $session_update$
> BEGIN
> -- Chec
I've look throught the docs and from what I can see the bellow code should
work, however I keep getting the error:
ERROR: parser: parse error at or near "$" at character 53
CREATE FUNCTION session_update() RETURNS trigger AS $session_update$
BEGIN
-- Check date exists
IF NEW.st
On 7/22/05, Jim Buttafuoco <[EMAIL PROTECTED]> wrote:
> Mark,
>
> Instead of RETURN NEXT rec.txt1; RETURN NEXT rec.txt2; just use RETURN NEXT
> rec;
>
> then your select statement would be
> select * from my_func() as (txt1 text,txt2 text);
>
> Jim
Besides a simple RETURN NEXT, you'll need to
On Fri, Jul 22, 2005 at 11:03:40 -0300,
[EMAIL PROTECTED] wrote:
> Hi.
> I have searched in mailing-list archives about converting types, but I
> couldn't
> found a function or clause that convert a numeric type to money type.
> How Can I convert this types?
>
> => select '1234'::money;
>mo
Mark,
Instead of RETURN NEXT rec.txt1; RETURN NEXT rec.txt2; just use RETURN NEXT
rec;
then your select statement would be
select * from my_func() as (txt1 text,txt2 text);
Jim
-- Original Message ---
From: "Mark R. Dingee" <[EMAIL PROTECTED]>
To: pgsql-sql@postgresql.org
Hi Everyone,
Does anyone know if/how it's possible to return multi-column sets from a pgsql
function? Right now I'm using something like the following as a work around
CREATE OR REPLACE FUNCTION my_func() returns SETOF TEXT AS '
DECLARE
rec record;
BEGIN
FOR rec IN SELECT txt1, txt2 FRO
On 7/22/05, Dongsoo Yoon <[EMAIL PROTECTED]> wrote:
I use a function using array variable as following.
The function returns array type.
When array variable is allocated with any value,allocating is not
done.
I can't find why it is.
--
Hi.
I have searched in mailing-list archives about converting types, but I couldn't
found a function or clause that convert a numeric type to money type.
How Can I convert this types?
=> select '1234'::money;
money
R$1.234,00
=> select '1234'::numeric::money;
ERROR: cannot cast
On Fri, Jul 22, 2005 at 06:24:03PM +0900, Dongsoo Yoon wrote:
>
> When array variable is allocated with any value,
> allocating is not done.
It's not clear what this means -- what are you expecting to happen,
and what actually is happening?
> v_testval := t_modifiedTimes[v_dayIndex ] ;
On 7/22/05, frank church <[EMAIL PROTECTED]> wrote:
Is it possible to use subselects as joins in PostgreSQL.
Absolutely.
select * from
(select * from table1) as a,
(select * from table2) as b
where a.a = b.b
You may get problems. At least we did.
Having a long term transaction which seemingly just was one Begin with
nothing, we encountered a siginifficant decrease of performance after some
days (70 tx/sec)
During that the pg_subtrans dir filled up with files and the IO-reads of the
disk as well. After
Is it possible to use subselects as joins in PostgreSQL.
eg.
select a.a, a.b, a.c, b.a, b.b. b.c from (first subsselect) a (second subselect)
b where (in table criteria) and a.a = b.a
or
select a.a, a.b, a.c, b.a, b.b. b.c from (first subsselect) a join (second
subselect) b on a.a = b.a wher
I use a function using array variable as following.
The function returns array type.
When array variable is allocated with any value,allocating is not
done.
I can't find why it is.
---
CREATE OR REPLACE FUNCTION arr_tes
I use a function using array variable as following.
The function returns array type.
When array variable is allocated with any value,allocating is not
done.
I can't find why it is.
---
CREATE OR REPLACE FUNCTION arr_
22 matches
Mail list logo