Re: variable substitution in SQL commands - Mailing list pgsql-novice

From Tom Lane
Subject Re: variable substitution in SQL commands
Date
Msg-id 16258.1264971980@sss.pgh.pa.us
Whole thread Raw
In response to variable substitution in SQL commands  (bill house <wchouse@bellsouth.net>)
Responses Re: variable substitution in SQL commands  (bill house <wchouse@bellsouth.net>)
List pgsql-novice
bill house <wchouse@bellsouth.net> writes:
> I am trying to learn how to construct SQL commands using information
> derived from other SQL commands/querys.
> These commands are stored for the moment in a simple text file which
> would be executed by the psql client like so:
>     current_database=# \i sql_command_file.sql

This is really getting beyond what you can do usefully with a simple
psql text file.  My first suggestion would be to see if you can write
what you need as a plpgsql function.

            regards, tom lane

pgsql-novice by date:

Previous
From: bill house
Date:
Subject: variable substitution in SQL commands
Next
From: bill house
Date:
Subject: Re: variable substitution in SQL commands