Hi,
I am trying to overload the "coalesce" function to
accept an integer and a string. Here it is :
CREATE OR REPLACE FUNCTION "coalesce"(a int4, b
"varchar")
RETURNS "varchar" AS
$BODY$
begin
if (a is null ) then
return b;
else
return cast(a as varchar(15));
end if;
end
$BODY$
LAN
Emil Rachovsky wrote:
Hi,
I am trying to overload the "coalesce" function to
accept an integer and a string. Here it is :
CREATE OR REPLACE FUNCTION "coalesce"(a int4, b
"varchar")
RETURNS "varchar" AS
...
I have added it to pg_catalog, but still I cant't use
it, I get an error on the seco
--- Richard Huxton wrote:
> Emil Rachovsky wrote:
> >
> > Hi,
> > I am trying to overload the "coalesce" function to
> > accept an integer and a string. Here it is :
> >
> > CREATE OR REPLACE FUNCTION "coalesce"(a int4, b
> > "varchar")
> > RETURNS "varchar" AS
> ...
> > I have added it to
Emil Rachovsky wrote:
--- Richard Huxton wrote:
Emil Rachovsky wrote:
Hi,
I am trying to overload the "coalesce" function to
accept an integer and a string. Here it is :
CREATE OR REPLACE FUNCTION "coalesce"(a int4, b
"varchar")
RETURNS "varchar" AS
...
I have added it to pg_catalog, b
Hi,
to be compatible with the postgres standard syntax in 8.1.x i need some
help for rewriting my "delete" statements ("select" is not a problem). I
use the following statement:
DELETE FROM partner_zu
WHERE partner_zu.pa_id = partner.id
AND partner_zu.m_id = '25'
AND partner.open = 'm'
AND pa
am 06.03.2006, um 14:25:52 +0100 mailte Thomas Beutin folgendes:
> Hi,
>
> to be compatible with the postgres standard syntax in 8.1.x i need some
> help for rewriting my "delete" statements ("select" is not a problem). I
> use the following statement:
>
> DELETE FROM partner_zu
> WHERE partne
Thomas Beutin wrote:
Hi,
to be compatible with the postgres standard syntax in 8.1.x i need some
help for rewriting my "delete" statements ("select" is not a problem). I
use the following statement:
DELETE FROM partner_zu
WHERE partner_zu.pa_id = partner.id
AND partner_zu.m_id = '25'
AND par
Richard Huxton wrote:
Thomas Beutin wrote:
Hi,
to be compatible with the postgres standard syntax in 8.1.x i need
some help for rewriting my "delete" statements ("select" is not a
problem). I use the following statement:
DELETE FROM partner_zu
WHERE partner_zu.pa_id = partner.id
AND partne
am 06.03.2006, um 15:27:54 +0100 mailte Thomas Beutin folgendes:
> >>DELETE FROM partner_zu
> >>WHERE partner_zu.pa_id = partner.id
> >>AND partner_zu.m_id = '25'
> >>AND partner.open = 'm'
> >>AND partner.a_id = partner_zu.a_id
> >>AND partner_zu.a_id = '104335887112347';
> >DELETE FROM partner_z
Hello,
I created a function "coalescec" which behaves the
same as coalesce, but uses an integer and a string.
Now I'm getting an error in the folowing statements :
query := 'select "UID" from S_Users_To_Connection
where ConnID = ' || coalescec(conn_id,'null');
execute query into nUID;
ERROR:
"A. Kretschmer" <[EMAIL PROTECTED]> writes:
> *untested*
> DELETE FROM partner_zu using partner
> WHERE partner_zu.pa_id = partner.id
> ...
> The point is the 'using ...'
You can also just set the add_missing_from to true for that one session if you
prefer. I don't think there's any plans to remo
On Mon, Mar 06, 2006 at 07:21:58AM -0800, Emil Rachovsky wrote:
> I created a function "coalescec" which behaves the
> same as coalesce, but uses an integer and a string.
Is there a reason you can't use the standard COALESCE and cast the
integer value to text/varchar?
> Now I'm getting an error i
Richard Huxton writes:
> Hmm - looking at the source (and \df in psql) it seems the basic problem
> is that COALESCE() isn't a function.
If it were an ordinary function, it couldn't satisfy the property of not
evaluating "unused" arguments ...
regards, tom lane
13 matches
Mail list logo