Thread: failed to create directory in postgresql

failed to create directory in postgresql

From
Nikhil Ingale
Date:
Hi All,
I'm trying to create the directory but unable to do it. I don't find this command anywhere in postgresql. But the EDB suggests using this command to create a directory.

postgres=# create directory utildir as '/tmp/utildir';
ERROR:  syntax error at or near "directory"
LINE 1: create directory utildir as '/tmp/utildir';
               ^
Regards,
Nikhil

Re: failed to create directory in postgresql

From
Julien Rouhaud
Date:
Hi,

On Fri, Oct 28, 2022 at 01:34:44PM +0530, Nikhil Ingale wrote:
> I'm trying to create the directory but unable to do it. I don't find this
> command anywhere in postgresql. But the EDB suggests using this command to
> create a directory.
> 
> postgres=# create directory utildir as '/tmp/utildir';
> ERROR:  syntax error at or near "directory"
> LINE 1: create directory utildir as '/tmp/utildir';
>                ^

This is an EDB-specific command, community version doesn't have it.



Re: failed to create directory in postgresql

From
Nikhil Ingale
Date:
Do we need to install extension to get it work?

On Fri, Oct 28, 2022 at 1:40 PM Julien Rouhaud <rjuju123@gmail.com> wrote:
Hi,

On Fri, Oct 28, 2022 at 01:34:44PM +0530, Nikhil Ingale wrote:
> I'm trying to create the directory but unable to do it. I don't find this
> command anywhere in postgresql. But the EDB suggests using this command to
> create a directory.
>
> postgres=# create directory utildir as '/tmp/utildir';
> ERROR:  syntax error at or near "directory"
> LINE 1: create directory utildir as '/tmp/utildir';
>                ^

This is an EDB-specific command, community version doesn't have it.

Re: failed to create directory in postgresql

From
Julien Rouhaud
Date:
On Fri, Oct 28, 2022 at 01:46:02PM +0530, Nikhil Ingale wrote:
> Do we need to install extension to get it work?

No, you need to buy their product and use it.

What problem exactly are you trying to solve?



Re: failed to create directory in postgresql

From
Samed YILDIRIM
Date:
Hello Nikhil,

Can you explain what you try to achieve? You probably try doing some practices you know from Oracle experience. Why do you need to create a directory on filesystem through PostgreSQL interface?

Best regards.
Samed YILDIRIM

On Fri, 28 Oct 2022, 10:18 Julien Rouhaud, <rjuju123@gmail.com> wrote:
On Fri, Oct 28, 2022 at 01:46:02PM +0530, Nikhil Ingale wrote:
> Do we need to install extension to get it work?

No, you need to buy their product and use it.

What problem exactly are you trying to solve?


Re: failed to create directory in postgresql

From
Thomas Kellerer
Date:
Samed YILDIRIM schrieb am 28.10.2022 um 10:23:
> Can you explain what you try to achieve? You probably try doing some
> practices you know from Oracle experience. Why do you need to create
> a directory on filesystem through PostgreSQL interface?


In Oracle, CREATE DIRECTORY doesn't actually create a directory in the filesystem

It essentially _registers_ an existing filesystem directory with Oracle so
that it can be used e.g. for datapump or external tables.