Peter Eisentraut escribió: > psql manual page: > > -c command > > --command command > Specifies that psql is to execute one command string, command, > and then exit. This is useful in shell scripts. > > command must be either a command string that is completely > parsable by the server (i.e., it contains no psql specific > features), or a single backslash command. Thus you cannot mix > SQL and psql meta-commands with this option. Doesn't say about variable expansion ... And it seems to be in a different realm, because the point is that the command is going to have a single destination (either \-processing or sending it to the server). Is psql being just lazy here and avoiding parsing the command? -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc.