RE: function import/export pgadmin4

From: QUIDOZ Marie-Claude <Marie-claude(dot)QUIDOZ(at)cefe(dot)cnrs(dot)fr>
To: "pgadmin-support(at)postgresql(dot)org" <pgadmin-support(at)postgresql(dot)org>
Subject: RE: function import/export pgadmin4
Date: 2017-12-19 17:42:04
Message-ID: 14b08cf9-8318-4941-8a3c-a5b71efe1a7e@CNCH01WVP.core-res.rootcore.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

Hello

I'm coming back with my export / import problem.

In the PGADMIN4 server version, you have programmed the COPY command. For a simple user (without right on the server), the \ COPY meta command will be more useful.

\copy { table [ ( column_list ) ] | ( query ) } { from | to } { 'filename' | program 'command' | stdin | stdout | pstdin | pstdout } [ [ with ] ( option [, ...] ) ]
Performs a frontend (client) copy. This is an operation that runs an SQL COPY<https://www.postgresql.org/docs/9.3/static/sql-copy.html> command, but instead of the server reading or writing the specified file, psql reads or writes the file and routes the data between the server and the local file system. This means that file accessibility and privileges are those of the local user, not the server, and no SQL superuser privileges are required.
When program is specified, command is executed by psql and the data from or to command is routed between the server and the client. This means that the execution privileges are those of the local user, not the server, and no SQL superuser privileges are required.
\copy ... from stdin | to stdout reads/writes based on the command input and output respectively. All rows are read from the same source that issued the command, continuing until \. is read or the stream reaches EOF. Output is sent to the same place as command output. To read/write from psql's standard input or output, use pstdin or pstdout. This option is useful for populating tables in-line within a SQL script file.
The syntax of the command is similar to that of the SQL COPY<https://www.postgresql.org/docs/9.3/static/sql-copy.html> command, and option must indicate one of the options of the SQL COPY<https://www.postgresql.org/docs/9.3/static/sql-copy.html> command. Note that, because of this, special parsing rules apply to the \copy command. In particular, the variable substitution rules and backslash escapes do not apply.
Do you plan to develop it?

Thanks

MCQ

+++++++++++++++++
Marie-Claude QUIDOZ
CEFE / CNRS
1919, Route de Mende
34293 Montpellier Cedex 5
Tel : 04 67 61 32 39
Marie-Claude(dot)Quidoz(at)cefe(dot)cnrs(dot)fr<mailto:Marie-Claude(dot)Quidoz(at)cefe(dot)cnrs(dot)fr>
http://www.cefe.cnrs.fr/fr/pf/sie

De : QUIDOZ Marie-Claude
Envoyé : mardi 12 septembre 2017 09:39
À : pgadmin-support(at)postgresql(dot)org; QUIDOZ Marie-Claude <Marie-claude(dot)QUIDOZ(at)cefe(dot)cnrs(dot)fr>
Objet : Re: function import/export pgadmin4

Hello

Thank you for your reply. I also noticed that in "query tool" the files must be on the server.

I confess that I don't understand the purpose of pgadmin4n, server version. I thought it was to "replace" phppgadmin but I had to make a misinterpretation

Thank you

MCQ

Le 06/09/2017 à 14:57, Melvin Davidson a écrit :
Marie,

>but the function ask that the csv file for exemple are on a server
>directory not on a local pc.

Yes, that is how it has always been and is expected to work. Just use
WinSCP or ftp to the local pc, then the file will be accessible.

Melvin Davidson 🎸

I reserve the right to fantasize. Whether or not you
wish to share my fantasy is entirely up to you. [http://us.i1.yimg.com/us.yimg.com/i/mesg/tsmileys2/01.gif]
www.youtube.com/unusedhero/videos<http://www.youtube.com/unusedhero/videos>
Folk Alley - All Folk - 24 Hours a day
www.folkalley.com<http://www.folkalley.com>

On Wednesday, September 6, 2017, 4:05:49 AM EDT, QUIDOZ Marie-Claude <Marie-claude(dot)QUIDOZ(at)cefe(dot)cnrs(dot)fr><mailto:Marie-claude(dot)QUIDOZ(at)cefe(dot)cnrs(dot)fr> wrote:

Hello

Thanks for you answer but the function ask that the csv file for exemple are on a server directory not on a local pc.

Thank you

MCQ

Envoyé depuis mon Sony Xperia SP d'Orange

---- Melvin Davidson a écrit ----

Marie,

I think the PgAdmin developers may have confused you.
The import/export function is for importing or exporting _data_
into a table. To use it, expand a database, schema and tables and
click on a table object. You will then be able to specify export or
import to or from a local file.

If you are referring to importing an object/function, then just open
a SQL window. From there you can export sql queries or load a sql file.

Melvin Davidson ��
I reserve the right to fantasize. Whether or not you
wish to share my fantasy is entirely up to you. [http://us.i1.yimg.com/us.yimg.com/i/mesg/tsmileys2/01.gif]
www.youtube.com/unusedhero/videos<http://www.youtube.com/unusedhero/videos>
Folk Alley - All Folk - 24 Hours a day
www.folkalley.com<http://www.folkalley.com>

On Tuesday, September 5, 2017, 5:47:22 PM EDT, Marie-Claude Quidoz <marie-claude(dot)quidoz(at)cefe(dot)cnrs(dot)fr><mailto:marie-claude(dot)quidoz(at)cefe(dot)cnrs(dot)fr> wrote:

Hello

I am trying to test pgadmin4 version server and more particularly the functions import and export because I want to allow my users to manage their own import.

I thought that Pgadmin4 would import localized files on my workstation (like phppgadmin) but that does not seem to be the case.

Did I miss a configuration?

Thank you

MCQ

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message David G. Johnston 2017-12-19 18:01:55 Re: function import/export pgadmin4
Previous Message Edson Richter 2017-12-19 12:01:11 RES: Faded text in pgAdmin 4 2.0/Win Server 2008r2