Jeff Amiel <[EMAIL PROTECTED]> writes:
> What is the difference between:
> select foo();
> and
> select * from foo();
They're implemented differently, partly for legacy or lack-of-round-tuit
reasons, and partly because different PLs prefer different strategies
for returning sets.
The first form o
Thanks a lot. I missed your post when it first came up, but I just
tried double-quoting the type indicator and it worked like a charm!
--Angus
Tom Lane wrote:
"Angus B. Atkins-Trimnell" <[EMAIL PROTECTED]> writes:
I am having trouble with a function designed to return all column
constrain
"Angus B. Atkins-Trimnell" <[EMAIL PROTECTED]> writes:
> I am having trouble with a function designed to return all column
> constraints on a table.
I think the problem is that you're declaring the contype return column
as char (ie, character(1)) when pg_constraint.contype is actually "char"
(a h
On 10/27/06, J S B <[EMAIL PROTECTED]> wrote:
Can I have a function (language sql) returning SETOF more than one table?
Thanks,
Jas
no, but you can return a record of refcursors. note this is plpgsql.
if you are willing to bend on the language, you will find refcursors
to be pretty cool, you
am Fri, dem 27.10.2006, um 4:30:47 -0400 mailte J S B folgendes:
> Can I have a function (language sql) returning SETOF more than one table?
You can create some tables within the function...
Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47215, D1: 0160/7141639 (mehr: -> Header)
Gn
Simpler is better ;o)
Thanks for the input...
On Thursday 01 December 2005 10:31 pm, David Fetter saith:
> On Thu, Dec 01, 2005 at 12:32:02PM -0500, Terry Lee Tucker wrote:
> > List,
> >
> > I have a simple function:
>
> I have a simpler one :)
>
> CREATE OR REPLACE FUNCTION split_to_rows(TEXT, T
On Thu, Dec 01, 2005 at 12:32:02PM -0500, Terry Lee Tucker wrote:
> List,
>
> I have a simple function:
I have a simpler one :)
CREATE OR REPLACE FUNCTION split_to_rows(TEXT, TEXT) /* Descriptive name */
RETURNS SETOF TEXT
STRICT
LANGUAGE sql
AS $$
SELECT (string_to_array($1, $2))[s.i]
F
Terry Lee Tucker wrote:
List,
I have a simple function:
CREATE OR REPLACE FUNCTION parse_string (TEXT, TEXT) RETURNS SETOF TEXT AS '
DECLARE
str ALIAS FOR $1; -- the string to parse
delimiter ALIAS FOR $2; -- the delimiter
field TEXT;
I knew I was doing something stupid. Right after I sent this I realized I was
calling incorrectly. This works:
rnd=# select * from parse_string ('1/2/3/4/5', '/');
NOTICE: parse_string ()
parse_string
--
1
2
3
4
5
(5 rows)
And so does this:
rnd=# select ARRAY(SELECT * from pars
On Wed, 17 Dec 2003, Ron St-Pierre wrote:
> Stephan Szabo wrote:
>
> >On Wed, 17 Dec 2003, Ron St-Pierre wrote:
> >
> >
> >
> >>On a daily basis I place a lot of data into the empty table dailyList,
> >>and from that data update certain fields in currentList. I thought that
> >>using a function wo
Ron St-Pierre <[EMAIL PROTECTED]> writes:
> On a daily basis I place a lot of data into the empty table dailyList,
> and from that data update certain fields in currentList. I thought that
> using a function would be a good way to do this(?). However I get the
> following error when I run update
Stephan Szabo wrote:
On Wed, 17 Dec 2003, Ron St-Pierre wrote:
On a daily basis I place a lot of data into the empty table dailyList,
and from that data update certain fields in currentList. I thought that
using a function would be a good way to do this(?). However I get the
following error wh
On Wed, 17 Dec 2003, Ron St-Pierre wrote:
> On a daily basis I place a lot of data into the empty table dailyList,
> and from that data update certain fields in currentList. I thought that
> using a function would be a good way to do this(?). However I get the
> following error when I run updateC
13 matches
Mail list logo