RE: function import/export pgadmin4

Поиск
Список
Период
Сортировка
От QUIDOZ Marie-Claude
Тема RE: function import/export pgadmin4
Дата
Msg-id 14b08cf9-8318-4941-8a3c-a5b71efe1a7e@CNCH01WVP.core-res.rootcore.local
обсуждение исходный текст
Ответ на function import/export pgadmin4  (Marie-Claude Quidoz <marie-claude.quidoz@cefe.cnrs.fr>)
Ответы Re: function import/export pgadmin4  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список 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 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 command, and option must indicate one of the options of the SQL COPY 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.Quidoz@cefe.cnrs.fr

http://www.cefe.cnrs.fr/fr/pf/sie

 

 

De : QUIDOZ Marie-Claude
Envoyé : mardi 12 septembre 2017 09:39
À : pgadmin-support@postgresql.org; QUIDOZ Marie-Claude <Marie-claude.QUIDOZ@cefe.cnrs.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.

www.youtube.com/unusedhero/videos
Folk Alley - All Folk - 24 Hours a day
www.folkalley.com

 

 

On Wednesday, September 6, 2017, 4:05:49 AM EDT, QUIDOZ Marie-Claude <Marie-claude.QUIDOZ@cefe.cnrs.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.

www.youtube.com/unusedhero/videos
Folk Alley - All Folk - 24 Hours a day
www.folkalley.com

 

 

On Tuesday, September 5, 2017, 5:47:22 PM EDT, Marie-Claude Quidoz <marie-claude.quidoz@cefe.cnrs.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

 

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

Предыдущее
От: Edson Richter
Дата:
Сообщение: RES: Faded text in pgAdmin 4 2.0/Win Server 2008r2
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: function import/export pgadmin4