Skip site navigation (1) Skip section navigation (2)

Re: RE : How do I compile/test a PL/SQL in Postgresql

From: Richard Broersma Jr <rabroersma(at)yahoo(dot)com>
To: Patrick Ng <patrick(dot)ng(at)zuji(dot)com>, pgsql-novice(at)postgresql(dot)org
Subject: Re: RE : How do I compile/test a PL/SQL in Postgresql
Date: 2006-07-20 13:47:31
Message-ID: 20060720134731.32481.qmail@web31813.mail.mud.yahoo.com (view raw or flat)
Thread:
Lists: pgsql-novice
> psql -U abc -d DB_NAME
> At the Postgresql prompt, I type \i d:\abc.sql
> but got a D:: Permission denied
> I have added MACHINE_NAME\postgres user to d: drive and its subfolders
> but am still getting the above error.
> Do you have any idea what can be wrong? abc.sql is a stored function.

Here is another link for psql commands:
http://www.postgresql.org/docs/8.0/static/app-psql.html

if you notice your error message shows two colons in "D::".  Maybe it is a path problem.
try:

psql> \!pwd    --to get your current working directory.

Also from the above page:

Parsing for arguments stops when another unquoted backslash occurs. This is taken as the beginning
of a new meta-command. The special sequence \\ (two backslashes) marks the end of arguments and
continues parsing SQL commands, if any. That way SQL and psql commands can be freely mixed on a
line. But in any case, the arguments of a meta-command cannot continue beyond the end of the line.


So maybe the path "d:\abc.sql"  the single \ is giving you problems. Maybe try d:\\abc.sql.
or try:

psql> \cd d:\\  --to change to this directory

this simply try:

psql> \i abc.sql

regards,

Richard Broersma Jr.



In response to

pgsql-novice by date

Next:From: Patrick NgDate: 2006-07-20 15:15:13
Subject: Re: RE : How do I compile/test a PL/SQL in Postgresql
Previous:From: Patrick NgDate: 2006-07-20 13:24:20
Subject: Re: RE : How do I compile/test a PL/SQL in Postgresql

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group