PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ make_sql_create_table()

def raster2pgsql.make_sql_create_table (   options,
  table = None,
  is_overview = False 
)

Definition at line 352 of file raster2pgsql.py.

References logit(), make_sql_full_table_name(), and quote_sql_name().

Referenced by main(), and wkblify_raster_level().

352 def make_sql_create_table(options, table = None, is_overview = False):
353 
354  if table is None:
355  table = options.table
356 
357  if options.filename:
358  sql = "CREATE TABLE %s (rid serial PRIMARY KEY, \"filename\" text);\n" \
359  % (make_sql_full_table_name(table))
360  else:
361  if options.overview_level > 1 and is_overview:
362  sql = "CREATE TABLE %s (rid serial PRIMARY KEY, %s RASTER);\n" \
363  % (make_sql_full_table_name(table), quote_sql_name(options.column))
364  else:
365  sql = "CREATE TABLE %s (rid serial PRIMARY KEY);\n" \
366  % (make_sql_full_table_name(table))
367 
368  logit("SQL: %s" % sql)
369  return sql
370 
371 
def make_sql_full_table_name(schema_table)
def logit(msg)
def make_sql_create_table(options, table=None, is_overview=False)
def quote_sql_name(name)
Here is the call graph for this function:
Here is the caller graph for this function: