src/bin/psql/large_obj.c
bool
do_lo_list(void)
{
	PGresult   *res;
	char		buf[1024];
	printQueryOpt myopt = pset.popt;

	snprintf(buf, sizeof(buf),
			 "SELECT oid as \"%s\",\n"
			 "  pg_catalog.pg_get_userbyid(lomowner) as \"%s\",\n"
			 "  pg_catalog.obj_description(oid, 'pg_largeobject') as \"%s\"\n"
			 "  FROM pg_catalog.pg_largeobject_metadata "
			 "  ORDER BY oid",
			 gettext_noop("ID"),
			 gettext_noop("Owner"),
			 gettext_noop("Description"));

	res = PSQLexec(buf);
	if (!res)
		return false;

	myopt.topt.tuples_only = false;
	myopt.nullPrint = NULL;
	myopt.title = _("Large objects");
	myopt.translate_header = true;

	printQuery(res, &myopt, pset.queryFout, false, pset.logfile);

	PQclear(res);
	return true;
}
/*
 * do_lo_list()
 *
 * Show all large objects in database with comments
 */
do_lo_list()
Show all large objects in database with comments
do_lo_list () Show all large objects in database with comments
bool
do_lo_list(void)
{
	PGresult   *res;
	char		buf[1024];
	printQueryOpt myopt = pset.popt;
	snprintf(buf, sizeof(buf),
			 "SELECT oid as \"%s\",\n"
			 "  pg_catalog.pg_get_userbyid(lomowner) as \"%s\",\n"
			 "  pg_catalog.obj_description(oid, 'pg_largeobject') as \"%s\"\n"
			 "  FROM pg_catalog.pg_largeobject_metadata "
			 "  ORDER BY oid",
			 gettext_noop("ID"),
			 gettext_noop("Owner"),
			 gettext_noop("Description"));
	res = PSQLexec(buf);
	if (!res)
		return false;
	myopt.topt.tuples_only = false;
	myopt.nullPrint = NULL;
	myopt.title = _("Large objects");
	myopt.translate_header = true;
	printQuery(res, &myopt, pset.queryFout, false, pset.logfile);
	PQclear(res);
	return true;
}
bool do_lo_list ( void ) { PGresult * res ; char buf [ 1024 ] ; printQueryOpt myopt = pset . popt ; snprintf ( buf , sizeof ( buf ) , " \" \" \n " " \" \" \n " " \" \" \n " " " " " , gettext_noop ( " " ) , gettext_noop ( " " ) , gettext_noop ( " " ) ) ; res = PSQLexec ( buf ) ; if ( ! res ) return false ; myopt . topt . tuples_only = false ; myopt . nullPrint = NULL ; myopt . title = _ ( " " ) ; myopt . translate_header = true ; printQuery ( res , & myopt , pset . queryFout , false , pset . logfile ) ; PQclear ( res ) ; return true ; }
do_lo_list()
 Show all large objects in database with comments
do_lo_list () Show all large objects in database with comments