Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error in executing SQL statement with PostgreSQL

Tags:

sql

postgresql

I create a new database 'sakila' with pgAdmin III in my local PostgreSQL database, then executed these sql statements:

sakila-schema.sql then sakila-data.sql

The first statement executed without error, however the second SQL did produced error when executed:

ERROR:  syntax error at or near "1"
LINE 112: 1 PENELOPE GUINESS 2006-02-15 09:34:33
          ^

********** Error **********

ERROR: syntax error at or near "1"
SQL state: 42601
Character: 2511

How to fix this error?

like image 280
quarks Avatar asked Jul 26 '12 16:07

quarks


1 Answers

You can't COPY FROM stdin with pgAdmin, you have to use psql tool, the problem is that pgAdmin is not a console application, there is no easily usable stdin so you can't COPY from Standard Input .

like image 155
aleroot Avatar answered Sep 19 '22 08:09

aleroot