The .asc file is a raster format know as ARC/INFO ASCII GRID (also known as ESRI ASCII raster) (see for example, here and here). It serves mostly the purpose of exchanging data among software/platforms.
As others have pointed out, raster2pgsql is a tool which can import .asc files to PostgreSQL. The syntax is:
raster2pgsql raster_options_go_here raster_file someschema.sometable > out.sql
An example which takes into account importing multiple .asc files is:
raster2pgsql -c -I -F -s 3857 -t 128x128 path_to_folder/*.asc someschema.sometable | psql -U postgres -d gisdb -h localhost -p 5432.
It creates a new table (-c) named 'sometable' within schema named 'somescheme' and imports all .asc files within 'path_to_folder'.
All files are assigned the Coordinate Reference System (-s) equal to 3857 (this is the EPSG code); and indexed (-I). Moreover, the command line adds a column in 'sometable' to store each .asc filename (-F). Last, -t tiles each raster with both width and height as 128 pixels. This is helpful to improve performance in polygon/raster overlay operations (see for example, Importing multiple .asc files into PostGIS violates check constraint. Why?).
ST_Intersectsin WGS84. Is it better Raster or PointCloud? – Randomize May 02 '18 at 19:05