Ok, now I think I understand since I already have a result set from the
query I cannot use yield.
The other example works because I am generating only one result set.
On Mon, Aug 17, 2009 at 7:55 PM, Nuno Mota wrote:
> I have fixed the problem populating a list and returning it.
>
&g
I have fixed the problem populating a list and returning it.
Well I guess I have to learn a litte bit more of python to understand how to
use yield when using multiple result sets.
Thank you anyway
On Mon, Aug 17, 2009 at 7:23 PM, Adrian Klaver wrote:
>
>
> ----- "Nun
Thank you very much,
Can i ask one more question ?
How do I declare the correct result set to return, this in first example
code, is it possible ?
Thank you again,
Nuno Mota
On Mon, Aug 17, 2009 at 3:21 PM, Adrian Klaver wrote:
> On Sunday 16 August 2009 5:13:51 pm Nuno Mota wrote:
>
for article in range(10) :
for other in range(10) :
if (other == 1) : continue
yield([article,other])
$$LANGUAGE plpythonu;
When executing the function on the psql console I always the this error.
netbo-dev=# select * from greet('Nuno');
ERROR: error fetching next
hello.
i deleted and recreated a db with the same name.
is it possible to recover the database back to where it was before i
deleted it?
i'd like to find this out first before i try to do some recovery
process.
thanks a lot.
---(end of broadcast)-
pg_database_size(oid), public.pg_dir_ls(text, boolean),
etc.
every single message is one of the types specified above. i read the
posts about pg_restore, and i still haven't been able to figure it out.
any clue anyone?
nuno wrote:
> hi, there, tom. thank you for your help.
>
> i turned -
r/dbsize', 'relation_size'
LANGUAGE c STRICT;
the options i am currently using are -i (ignore-version), -h (host), -d
(database), -U (user) and -W (password).
is there any way you can fix this problem?
thanks, nuno
Tom Lane wrote:
> "nuno" <[EMAIL PROTECTED]> writ
ad these errors. and i don't think they are
meaningful at all as i said earlied there is no data lost in the
database.
does anyone know how to turn this checking off so that i don't see
messages like them anymore.
thanks very much for your time.
regards, nuno
---
tion is that
would having indexes increase query performance when clearing tables?
or could anyone suggest me any ways to increase performance of the
query in such cases?
thanks very much.
regards, nuno
---(end of broadcast)---
TIP 4: Have you s
hi, there. i'm trying to write a SQL statement which does the following
things.
1. checks if data already exists in the database
2. if not, insert data into database otherwise skip.
for example, i'd like to insert a student called 'Michael Jordan' whose
ID is 'JORDANMICHAEL' only if the id, 'JORD
hi, all. thanks for the replies.
yes, i meant 'columns' not 'rows'. sorry if i made you a bit confused.
my explanation should've been more descriptive than that i suppose.
anyway, it's good to know that postgresql guarantees the column order.
i was just trying to be double-safe before i mess up w
hi, all.
i have a couple of questions regarding the order of table columns.
say, you have a following query;
SELECT id, firstname, lastname, dob FROM student;
does postgresql guarantee you that
the columns in the result set would be ordered
as specified in the query (i.e. id, firstname, lastname
the tuple into a datum */
result = TupleGetDatum(slot, tuple);
/* Clean up (this is not actually necessary) */
pfree(values[0]);
pfree(values[1]);
pfree(values[2]);
pfree(values);
SRF_RETURN_NEXT(funcctx, result);
}
e
the tuple into a datum */
result = TupleGetDatum(slot, tuple);
/* Clean up (this is not actually necessary) */
pfree(values[0]);
pfree(values[1]);
pfree(values[2]);
pfree(values);
SRF_RETURN_NEXT(funcctx, result);
}
e
14 matches
Mail list logo