Re: variable substitution in SQL commands

From: bill house <wchouse(at)bellsouth(dot)net>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: variable substitution in SQL commands
Date: 2010-02-01 03:27:21
Message-ID: 4B664A19.70805@bellsouth.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Tom Lane wrote:
> bill house <wchouse(at)bellsouth(dot)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
>

I was afraid you were going to say that. This was the indication that I
was getting from my reading, but I just wanted to make sure this trip
was really necessary.

Thanks,

Bill House

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Neil Stlyz 2010-02-01 07:36:55 combine SQL SELECT statements into one
Previous Message Tom Lane 2010-01-31 21:06:20 Re: variable substitution in SQL commands