Enclosing values in single quotes - Mailing list pgsql-general

From Ma Siva Kumar
Subject Enclosing values in single quotes
Date
Msg-id 02061812084601.01966@Bharathi
Whole thread Raw
Responses Re: Enclosing values in single quotes  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-general
I am trying to write a function which takes in an associative array (from a
user submitted form for example), converts the keys to a column array and
values to a value array. These arrays together with the name of the database
table are fed into another function, which generates the query string (insert
into $table ($colmn) values ($value)).

As a short cut,  I am enclosing all the values (numeric as well as strings)
in single quotes when generating the arrays.  In my trials so far,
everything is fine. What will be the issues in enclosing numeric values in
single quotes?

(I am learning this as a hobby and I do not have any formal training in
programming).

Any advice please.

Siva


--
Ma Siva Kumar
BSG LeatherLink,
No. 9, Trump Castle,
AI/92-A, 9th Main Road,
Anna Nagar, Chennai,
Tamil Nadu, India - 600040

Email: siva@leatherlink.net
Website: http://www.leatherlink.net/

pgsql-general by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: regular expression question
Next
From: Varun Kacholia
Date:
Subject: Re: Wierd Explain