examples of psql in shell script

Поиск
Список
Период
Сортировка
От Pam Wampler
Тема examples of psql in shell script
Дата
Msg-id 2E4528861499D41199D200A0C9B15BC0012F45C5@taylorwhite.com
обсуждение исходный текст
Список pgsql-novice
I am trying to run a shell script & pass variables from the shell script to
psql & get the following error --
does anyone have examples (I have read through the documentation & can't
seem to get it right)  thanks

this is my script cp.sh
#!/bin/sh
echo $1;
table1=$1;
echo $table1;
psql -c '\copy $table1 from 'fileout'' test


this is what i get when I run  sh -x./cp.sh  employees

ERROR:  Relation ':table1' does not exist
\copy: ERROR:  Relation ':table1' does not exist

В списке pgsql-novice по дате отправления: