Re: quoted_literal with numeric variable. - Mailing list pgsql-novice

From Tom Lane
Subject Re: quoted_literal with numeric variable.
Date
Msg-id 16653.1042739365@sss.pgh.pa.us
Whole thread Raw
In response to quoted_literal with numeric variable.  (Conxita Marín <comarin@telefonica.net>)
List pgsql-novice
=?iso-8859-1?Q?Conxita_Mar=EDn?= <comarin@telefonica.net> writes:
> How to construct an 'EXECUTE' sentence into a function using numeric
> variables?
> To insert the variable in the string to execute, i use
> 'quote_literal(numero)' where numero is a numeric variable.

Don't bother with quote_literal.  You only need that for string values
that might contain quotes or backslashes.  A numeric variable won't have
either.

            regards, tom lane

pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: VACUUM ANALYSE...
Next
From: "Rosta Farzan"
Date:
Subject: Re: reading command from file