Thread: pg_dump

pg_dump

From
Bob Pawley
Date:
This is the example found in the documentation to dump a database.
 
"Examples

To dump a database:

$ pg_dump mydb > db.out"
The following - $ pg_dump aurel > aurel.out - gives me 
"ERROR:  syntax error at or near "$" at character 1"
What am I missing???
Bob
 

Re: pg_dump

From
"Konrad Neuwirth"
Date:
> To dump a database: $ pg_dump mydb > db.out"
> The following - $ pg_dump aurel > aurel.out - gives me
> "ERROR:  syntax error at or near "$" at character 1"
> What am I missing???

The $ character is there to indicate the prompt your shell gives you.
If you leave it off at the beginning of your command, things should
just run fine.

Konrad

Re: pg_dump

From
Richard Broersma Jr
Date:
>
> "Examples
> To dump a database:
>
> $ pg_dump mydb > db.out"The following - $ pg_dump aurel > aurel.out - gives me "ERROR:  syntax
> error at or near "$" at character 1"What am I missing???Bob

 The $ isn't part of the command, it just just part of the shell's command-line prompt.

My shell command line prompt looks like this:

richard@db_server01 ~ $

if i want to jump a database then I would type the following command after the prompt:

richard@db_server01 ~ $ pg_dump mydb > db.out

Regards,

Richard Broersma Jr.

Re: pg_dump

From
Bricklen Anderson
Date:
Bob Pawley wrote:
> This is the example found in the documentation to dump a database.
>
> "Examples
>
> To dump a database:
>
> $ pg_dump mydb > db.out"
>
> The following - $ pg_dump aurel > aurel.out - gives me
>
> "ERROR:  syntax error at or near "$" at character 1"
>
> What am I missing???
>
> Bob
>
>

The "$" is part of the OS prompt. Windows would look something like
"c:\pg_dump mydb > db.out". Omit the "$" and it should be fine.

Re: pg_dump

From
Bob Pawley
Date:
No joy

pg_dump aurel > aurel.out

Returns -
ERROR:  syntax error at or near "pg_dump" at character 8

I've had a bit of trouble with the PostgreSQL system if that helps. (access
violation with a reinstall)

Bob

----- Original Message -----
From: "Konrad Neuwirth" <k.neuwirth@gmail.com>
To: "Bob Pawley" <rjpawley@shaw.ca>
Cc: "Postgresql" <pgsql-general@postgresql.org>
Sent: Thursday, November 23, 2006 1:45 PM
Subject: Re: [GENERAL] pg_dump


>> To dump a database: $ pg_dump mydb > db.out"
>> The following - $ pg_dump aurel > aurel.out - gives me
>> "ERROR:  syntax error at or near "$" at character 1"
>> What am I missing???
>
> The $ character is there to indicate the prompt your shell gives you.
> If you leave it off at the beginning of your command, things should
> just run fine.
>
> Konrad
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
>


Re: pg_dump

From
Richard Broersma Jr
Date:
> No joy
>
> pg_dump aurel > aurel.out
>
> Returns -
> ERROR:  syntax error at or near "pg_dump" at character 8
>
> I've had a bit of trouble with the PostgreSQL system if that helps. (access
> violation with a reinstall)

that is a psql error message isn't it.  pg_dump is a shell command that you would from from your
DOS or shell prompt.

that is what the "$" was trying to imply.

Regards,

Richard Broersma Jr.

Re: pg_dump

From
jcradock@me3.com
Date:
Bob,

This command:

pg_dump aurel

...should output the structure and contents of your "aurel" database to
your screen SQL with comments.

What version of PostgreSQL are you running and on what operating system?

Jim

> No joy
>
> pg_dump aurel > aurel.out
>
> Returns -
> ERROR:  syntax error at or near "pg_dump" at character 8
>
> I've had a bit of trouble with the PostgreSQL system if that helps.
> (access
> violation with a reinstall)
>
> Bob
>
> ----- Original Message -----
> From: "Konrad Neuwirth" <k.neuwirth@gmail.com>
> To: "Bob Pawley" <rjpawley@shaw.ca>
> Cc: "Postgresql" <pgsql-general@postgresql.org>
> Sent: Thursday, November 23, 2006 1:45 PM
> Subject: Re: [GENERAL] pg_dump
>
>
>>> To dump a database: $ pg_dump mydb > db.out"
>>> The following - $ pg_dump aurel > aurel.out - gives me
>>> "ERROR:  syntax error at or near "$" at character 1"
>>> What am I missing???
>>
>> The $ character is there to indicate the prompt your shell gives you.
>> If you leave it off at the beginning of your command, things should
>> just run fine.
>>
>> Konrad
>>
>> ---------------------------(end of broadcast)---------------------------
>> TIP 5: don't forget to increase your free space map settings
>>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
>



-----
James Cradock, jcradock@me3.com



Re: pg_dump

From
jcradock@me3.com
Date:
Sorry.

The command will output ... *AS* SQL with comments.

> Bob,
>
> This command:
>
> pg_dump aurel
>
> ...should output the structure and contents of your "aurel" database to
> your screen SQL with comments.
>
> What version of PostgreSQL are you running and on what operating system?
>
> Jim
>
>> No joy
>>
>> pg_dump aurel > aurel.out
>>
>> Returns -
>> ERROR:  syntax error at or near "pg_dump" at character 8
>>
>> I've had a bit of trouble with the PostgreSQL system if that helps.
>> (access
>> violation with a reinstall)
>>
>> Bob
>>
>> ----- Original Message -----
>> From: "Konrad Neuwirth" <k.neuwirth@gmail.com>
>> To: "Bob Pawley" <rjpawley@shaw.ca>
>> Cc: "Postgresql" <pgsql-general@postgresql.org>
>> Sent: Thursday, November 23, 2006 1:45 PM
>> Subject: Re: [GENERAL] pg_dump
>>
>>
>>>> To dump a database: $ pg_dump mydb > db.out"
>>>> The following - $ pg_dump aurel > aurel.out - gives me
>>>> "ERROR:  syntax error at or near "$" at character 1"
>>>> What am I missing???
>>>
>>> The $ character is there to indicate the prompt your shell gives you.
>>> If you leave it off at the beginning of your command, things should
>>> just run fine.
>>>
>>> Konrad
>>>
>>> ---------------------------(end of
>>> broadcast)---------------------------
>>> TIP 5: don't forget to increase your free space map settings
>>>
>>
>>
>> ---------------------------(end of broadcast)---------------------------
>> TIP 6: explain analyze is your friend
>>
>
>
>
> -----
> James Cradock, jcradock@me3.com
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
>        choose an index scan if your joining column's datatypes do not
>        match
>



-----
James Cradock, jcradock@me3.com



Re: pg_dump

From
Peter Wilson
Date:

Bob Pawley wrote:
No joy

pg_dump aurel > aurel.out

Returns -
ERROR:  syntax error at or near "pg_dump" at character 8
Looks like you're trying to run it from psql. pg_dump is a command line utility. Run it directly from the shell command prompt (or cmd window on windows).

Pete




I've had a bit of trouble with the PostgreSQL system if that helps. (access violation with a reinstall)

Bob

----- Original Message ----- From: "Konrad Neuwirth" <k.neuwirth@gmail.com>
To: "Bob Pawley" <rjpawley@shaw.ca>
Cc: "Postgresql" <pgsql-general@postgresql.org>
Sent: Thursday, November 23, 2006 1:45 PM
Subject: Re: [GENERAL] pg_dump


To dump a database: $ pg_dump mydb > db.out"
The following - $ pg_dump aurel > aurel.out - gives me
"ERROR:  syntax error at or near "$" at character 1"
What am I missing???

The $ character is there to indicate the prompt your shell gives you.
If you leave it off at the beginning of your command, things should
just run fine.

Konrad

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings



---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend



--

Peter Wilson
T: 01414 160505
M: 07796 656566
http://www.yellowhawk.co.uk
The information in this email is confidential and is intended for the addressee/s only. Access to this email by anyone else is unauthorised. If you are not the intended recipient, you must not read, use or disseminate the information contained in or attached to this email.

Re: pg_dump

From
"Richard P. Welty"
Date:
Bob Pawley wrote:
> No joy
>
> pg_dump aurel > aurel.out
>
> Returns -
> ERROR:  syntax error at or near "pg_dump" at character 8
>
> I've had a bit of trouble with the PostgreSQL system if that helps.
> (access violation with a reinstall)
how about giving the pg_dump command to a shell instead of inside
psql?

richard