Postgresql and scripting

Поиск
Список
Период
Сортировка
От Jerome Lyles
Тема Postgresql and scripting
Дата
Msg-id 200409070124.38722.susemail@hawaii.rr.com
обсуждение исходный текст
Ответы Re: Postgresql and scripting
Re: Postgresql and scripting
Список pgsql-general
I'm trying to create and populate some study tables using a couple of scripts
that came with my 'SQL in 10 minutes' book. This is how I tried to run the
script to create and populate tables in a database named test:

test-# \i create.txt
psql:create.txt:1: ERROR:  syntax error at or near "" at character 1

Here is the top of the script:
------------------------------------------------------------
 - -   S a m s   T e a c h   Y o u r s e l f   S Q L   i n   1 0   M i n u t e
s

 - -   h t t p : / / w w w . f o r t a . c o m / b o o k s / 0 6 7 2 3 2 5 6 6
7 /

 - -   E x a m p l e   t a b l e   c r e a t i o n   s c r i p t s   f o r  Po
s t g r e S Q L .

------------------------------------------------------------



 - - - - - - - - - - - - - - - - - - - - - - - - -

 - -   C r e a t e   C u s t o m e r s   t a b l e

 - - - - - - - - - - - - - - - - - - - - - - - - -

 C R E A T E   T A B L E   C u s t o m e r s

 (

     c u s t _ i d             c h a r ( 1 0 )     N O T   N U L L   ,

     c u s t _ n a m e         c h a r ( 5 0 )     N O T   N U L L   ,

     c u s t _ a d d r e s s   c h a r ( 5 0 )     ,

     c u s t _ c i t y         c h a r ( 5 0 )     ,

     c u s t _ s t a t e       c h a r ( 5 )       ,

     c u s t _ z i p           c h a r ( 1 0 )     ,

     c u s t _ c o u n t r y   c h a r ( 5 0 )     ,

     c u s t _ c o n t a c t   c h a r ( 5 0 )     ,

     c u s t _ e m a i l       c h a r ( 2 5 5 )

 ) ;

Can someone tell me what's going wrong here, why am I getting this error
message?
Thanks,
Jerome

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

Предыдущее
От: Devrim GUNDUZ
Дата:
Сообщение: Re: Help supressing NOTICE messages
Следующее
От: Devrim GUNDUZ
Дата:
Сообщение: Re: Postgresql and scripting