Pl/PgSQL String formatting like raise?

Started by Csaba Együdabout 17 years ago3 messagesgeneral
Jump to latest
#1Csaba Együd
csegyud@gmail.com

Hi,
is there a way in a Pl/PgSQL function (PG 8.1.* / 8.3.*) to cut together a
string value like it is done for RAISE Note/Exception?

I'd like to use s.g. like this :

StrVar := 'select * from t1 where f1=% and f2=%',
quote_literal(Param1),quote_literal(Param2);

Many Thanks!
csaba

#2Pavel Stehule
pavel.stehule@gmail.com
In reply to: Csaba Együd (#1)
Re: Pl/PgSQL String formatting like raise?

Hello

there is nothing similar. You should to use module plvsubst from Orafce
http://www.postgres.cz/index.php/Oracle_functionality_(en)#PLVsubst

regards
Pavel Stehule

2009/2/11 Csaba Együd <csegyud@gmail.com>:

Show quoted text

Hi,
is there a way in a Pl/PgSQL function (PG 8.1.* / 8.3.*) to cut together a
string value like it is done for RAISE Note/Exception?

I'd like to use s.g. like this :

StrVar := 'select * from t1 where f1=% and f2=%',
quote_literal(Param1),quote_literal(Param2);

Many Thanks!
csaba

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#3Csaba Együd
csegyud@gmail.com
In reply to: Pavel Stehule (#2)
Re: Pl/PgSQL String formatting like raise?

Pavel,
thank you very much for your answer.

--
Best Regards,
Csaba Együd

there is nothing similar. You should to use module plvsubst from Orafce
http://www.postgres.cz/index.php/Oracle_functionality_(en)#PLVsubst

regards
Pavel Stehule

2009/2/11 Csaba Együd <csegyud@gmail.com>:

Show quoted text

Hi,
is there a way in a Pl/PgSQL function (PG 8.1.* / 8.3.*) to cut together a
string value like it is done for RAISE Note/Exception?

I'd like to use s.g. like this :

StrVar := 'select * from t1 where f1=% and f2=%',
quote_literal(Param1),quote_literal(Param2);

Many Thanks!
csaba

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general