Functions apparently cannot take setof arguments.
Postgres 8.4:
CREATE OR REPLACE FUNCTION testtable(IN setof anyarray)
RETURNS anyarray AS
$BODY$
SELECT $1 LIMIT 1;
$BODY$
LANGUAGE 'sql' STABLE;
--
ERROR: functions cannot accept set arguments
Von: Viktor Bojović
Hello
use a array constructor instead
SELECT ARRAY(SELECT ...)
Regards
Pavel Stehule
2011/1/31 Andreas Gaab a.g...@scanlab.de:
Functions apparently cannot take setof arguments.
Postgres 8.4:
CREATE OR REPLACE FUNCTION testtable(IN setof anyarray)
RETURNS anyarray AS
$BODY$
Hi,
Could not the function regexp_matches(text, text) be defined to only return a
text[] not a setof text[]?
Because that is, what it actually does, or? For every input, it returns only
one output row. The function regexp_matches(text,text,text) in contrast really
can return multiple rows
As the subject implies, has this been fixed and is it in a currently
released GA build?
Best Regards
--
Michael Gould, Managing Partner
Intermodal Software Solutions, LLC
904.226.0978
904.592.5250 fax
Andreas Gaab a.g...@scanlab.de writes:
Could not the function regexp_matches(text, text) be defined to only return a
text[] not a setof text[]?
It'd be pretty hard to change at this point, because of
backwards-compatibility considerations, and because the two functions
share a single
maybe custom types can be helpful. i use them when i have to many variables
or arrays.
On Mon, Jan 31, 2011 at 9:52 AM, Andreas Gaab a.g...@scanlab.de wrote:
Functions apparently cannot take setof arguments.
Postgres 8.4:
CREATE OR REPLACE FUNCTION testtable(IN setof anyarray)
Good morning,
Is there an existing method to get days between two dates?
For example,
select '2010-01-01'::date - '1999-10-12'::date
Returns how many days.
Thank you,
--
Lu Ying
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
On 01/31/2011 11:33 AM, Oliveiros d'Azevedo Cristina wrote:
Doesn't the SELECT you indicated do what you need?
Ok, I figured out:
age() + date_part(...) would be able to get it:
select date_part('day', age(date1::timestamp, date2::timestamp) )
--
Lu Ying
- Original Message -
Ok, before 8.4, there I can use row_number().
For 8.3 + display tag + order by integer + paging based on pageBean
ArrayListBean alist;
In Bean.java, added:
private int rec_num;
in main .action java:
for(int i=0 ; ialist.size; i++)
{
Bean(i).setRec_num = (i+1);
...
}
This will let
On Mon, Jan 31, 2011 at 10:50:43AM -0500, Emi Lu wrote:
Good morning,
Is there an existing method to get days between two dates?
For example,
select '2010-01-01'::date - '1999-10-12'::date
Returns how many days.
Thank you,
--
Lu Ying
Didn't you just answer your own question?
Doesn't the SELECT you indicated do what you need?
Best,
Oliveiros
- Original Message -
From: Emi Lu em...@encs.concordia.ca
To: pgsql-sql@postgresql.org
Sent: Monday, January 31, 2011 3:50 PM
Subject: [SQL] Get days between two dates?
Good morning,
Is there an existing method to
That's precisely what I think..
:-|
- Original Message -
From: Kenneth Marshall k...@rice.edu
To: Emi Lu em...@encs.concordia.ca
Cc: pgsql-sql@postgresql.org
Sent: Monday, January 31, 2011 4:39 PM
Subject: Re: [SQL] Get days between two dates?
On Mon, Jan 31, 2011 at 10:50:43AM
On 01/31/2011 04:50 PM, Emi Lu wrote:
Good morning,
Is there an existing method to get days between two dates?
For example,
select '2010-01-01'::date - '1999-10-12'::date
Returns how many days.
Thank you,
--
Lu Ying
Hi !
Yes there is : date '2001-10-01' - date '2001-09-28'
13 matches
Mail list logo