Edmund Bacon wrote:
> Is there a way to convert a boolean value to text and/or vice versa?
>
[cause it doesn't work as expected]
>
> It's not that difficult to write a fuction to convert boolean to text,
> but I'm wondering if there's already something that does this?
You can help y
Is there a way to convert a boolean value to text and/or vice versa?
You can
select 'true'::boolean,
which *seems* to convert a text string to boolean, but
select 'true'::text::boolean
earns the message
ERROR: cannot cast type text to boolean
You can't go the other way either
SELECT true::text
ALÝ ÇELÝK wrote:
why this query needs more time? Its very slow
Difficult to say for sure - could you provide the output of EXPLAIN
ANALYSE rather than just EXPLAIN?
Some other immediate observations:
1. Perhaps don't post to so many mailing lists at once. If you reply to
this, maybe reduce it t
Yep.. i have solved this problem by specifying
the correct return type and variable type (should be the same)
but as said, in some cases pl_exec executes with type conversion.
as real example - i have :
return type = SETOF new type "category_node(catid, pcatid)"
variable = R, SR -> RECORD
and
FOR
On Mar 11, 2005, at 5:54 AM, Juris Zeltins wrote:
FOR P IN select pageid from pages
This way you are only getting the pageid column. I think what you want
is
FOR P in select * from pages
so that P contains the complete pages record.
John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreS
why this query needs more time? Its very slow
thx
//QUERY
select
coalesce(personaldetails.masterid::numeric,personaldetails.id) +
(coalesce(personaldetails.id::numeric,0)/100) as sorting,
floor(coalesce(personaldetails.masterid::numeric,personaldet
Hello!
i have problem with pl/pgsql function;
===
ERROR: wrong record type supplied in RETURN NEXT
CONTEXT: PL/pgSQL function "tests" line 6 at return next
===
-- Function: tests(int8)
-- DROP FUNCTION tests(int8);
CREATE OR REPLACE FUNCTION te