First create a geometry
or geography
column, e.g. with AddGeometryColumn
..
SELECT AddGeometryColumn ('public','postgis_test','geom',4326,'POINT',2);
.. and then update it with the output of ST_Buffer
UPDATE postgis_test
SET geom = ST_Buffer(ST_SetSRID(ST_MakePoint(lng,lat),4326),50, 'quad_segs=8');
Parameters of ST_Buffer
in detail:
ST_SetSRID(ST_MakePoint(lng,lat),4326)
: As you table had no geometry
or geography
column I used the function ST_MakePoint
to create one. The value 4326 corresponds to the SRS WGS84 - check which one suits your coordinates.
5
: radius of the buffer in degrees. If the first parameter is of type geography
this value is interpreted as meters.
'quad_segs='
: number of segments used to approximate a quarter circle (text from the documentation
)
After that you'll be able to import it into QGIS using the Add PostGIS Layer
option.
Examples
Creating buffers with a radius of 5 degrees
CREATE TABLE public.postgis_test (city TEXT, lng NUMERIC, lat NUMERIC);
SELECT AddGeometryColumn ('public','postgis_test','geom',4326,'polygon',2);
INSERT INTO postgis_test
VALUES ('New York',-74.00,40.71),
('Los Angeles',-118.24,34.05),
('Chicago',-87,41.87);
UPDATE postgis_test
SET geom = ST_Buffer(ST_SetSRID(ST_MakePoint(lng,lat),4326),5, 'quad_segs=8');
Visualizing buffers in QGIS

If you want to display both points and buffers at the same time, you have to create an extra layer (table):
CREATE TABLE public.postgis_test (city TEXT, lng NUMERIC, lat NUMERIC);
SELECT AddGeometryColumn ('public','postgis_test','geom',4326,'point',2);
INSERT INTO postgis_test
VALUES ('New York',-74.00,40.71),
('Los Angeles',-118.24,34.05),
('Chicago',-87,41.87);
UPDATE postgis_test SET geom = ST_SetSRID(ST_MakePoint(lng,lat),4326);
CREATE TABLE buffers AS
SELECT city, ST_Buffer(geom,5, 'quad_segs=8')
FROM postgis_test;

If you prefer to work with meters just cast the geometry column to geography
and pass the parameter in meters.
Creating buffers of 100 miles (~160934 meters)
CREATE TABLE public.postgis_test (city TEXT, lng NUMERIC, lat NUMERIC);
SELECT AddGeometryColumn ('public','postgis_test','geom',4326,'point',2);
INSERT INTO postgis_test
VALUES ('New York',-74.00,40.71),
('Los Angeles',-118.24,34.05),
('Chicago',-87,41.87);
UPDATE postgis_test SET geom = ST_SetSRID(ST_MakePoint(lng,lat),4326);
CREATE TABLE buffers AS
SELECT city, ST_Buffer(geom::geography,160934, 'quad_segs=8')::geometry
FROM postgis_test;

Further reading: