Search Postgresql Archives

Re: INSERTing rows from external file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 16, 2011 at 2:34 PM, Rich Shepard <rshepard@xxxxxxxxxxxxxxx> wrote:
>  I have a file with 5500 rows formated as 'INSERT INTO <table>
> (column_names) VALUES <values>;' that I thought I could read using psql from
> the command line. However, the syntax, 'psql <database_name> < filename.sql'
> throws an error at the beginning of the first INSERT statement.

What kind of error?
>
>  In the INSERT manual page I see no example or other insight on adding a
> large number of rows to a table from an external .sql file. Please point me
> to the reference on how to do this.

Do you get the same error by running psql interactively and typing \i
filename.sql?

Best Wishes,
Chris Travers

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux