9 lines
415 B
YAML
9 lines
415 B
YAML
- args:
|
|
cascade: true
|
|
read_only: false
|
|
sql: "CREATE OR REPLACE FUNCTION public.search_bills(search text)\n RETURNS SETOF
|
|
bills\n LANGUAGE plpgsql\n STABLE\nAS $function$\n\nBEGIN\n if search = ''
|
|
then\n return query select * from bills ;\n else \n return query SELECT\n
|
|
\ *\nFROM\n bills\nWHERE\n search <% (invoice_number);\n end if;\n\n\tEND\n$function$;"
|
|
type: run_sql
|