Re: function import/export pgadmin4

2017-12-19 Thread David G. Johnston
On Tue, Dec 19, 2017 at 10:42 AM, QUIDOZ Marie-Claude <
marie-claude.qui...@cefe.cnrs.fr> wrote:

> 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.
>

​pgAdmin should (I've only used it minimally and not v4) indeed implement
file export/import via SQL "COPY" (and a custom UI, not a query window) -
and would arrange for the proper command syntax and making the relevant
data available on the server's stdin (COPY FROM) or take the server's
response via stdout (COPY TO) and turn it into a file for you.

If you simply type "COPY" into a SQL query window and send it to the server
pgAdmin probably doesn't do anything special and you end up with whatever
normal behavior such a copy would entail.  That probably includes placing
non-SQL text (i.e., csv data) into the query screen and sending it to the
server for processing - just like you can in a psql script (i.e., COPY in
psql works with inline data).

pgAdmin doesn't have a text/CLI language that would control the application
like psql does.  Adding it simply for "\copy" is likely to fail a
cost/benefit analysis.​

In short, you can (probably) do everything you need to with the tools as
they exist today.  You might need to learn more about how they work, though.

David J.


RE: function import/export pgadmin4

2017-12-19 Thread QUIDOZ Marie-Claude
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.qui...@cefe.cnrs.fr
http://www.cefe.cnrs.fr/fr/pf/sie


De : QUIDOZ Marie-Claude
Envoyé : mardi 12 septembre 2017 09:39
À : pgadmin-supp...@postgresql.org; QUIDOZ Marie-Claude 

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
Folk Alley - All Folk - 24 Hours a day
www.folkalley.com


On Wednesday, September 6, 2017, 4:05:49 AM EDT, QUIDOZ Marie-Claude 
 
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
Folk Alley - All Folk - 24 Hours a day
www.folkalley.com


On Tuesday, September 5, 2017, 5:47:22 PM EDT, Marie-Claude Quidoz 
 
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?


RES: Faded text in pgAdmin 4 2.0/Win Server 2008r2

2017-12-19 Thread Edson Richter
Well, I’ve 2 x full hd, not a 4k. So, it is not the same problem we are talking 
about.
Anyway, as posted before (sent a screenshot), pgAdmin 4 is the only app with 
problems. It is unfortunate this will not be investigated further, because it 
is impossible to work on a tool that you can’t read.

Thanks for all you effort anyway.

Edson Richter


Enviado do Email para Windows 10


De: Dave Page 
Enviado: Monday, December 18, 2017 12:18:44 PM
Para: Edson Richter
Cc: Pgadmin-Support@Postgresql. Org
Assunto: Re: Faded text in pgAdmin 4 2.0/Win Server 2008r2



On Fri, Dec 1, 2017 at 5:46 PM, Edson Richter 
> wrote:
See attached image for your reference...
Just to reinforce, this happens only with PgAdmin4.
All other apps run fine (native legacy apps, .Net apps, Java apps).

So I tried with the following:

Windows Server 2008r2 Enterprise on the server
Windows 10 Pro on the client (running on a laptop with a 4K screen)

I found that event Windows Server itself doesn't play nicely with the 4K screen 
on the client - the Start Menu and other tools display exactly as your 
screenshots show pgAdmin does until I finally figured out that 200% scaling on 
the terminal services client largely makes that go away.

Unfortunately, it doesn't make it go away in pgAdmin - nor in Google Chrome 
which also seems to display fonts on websites with varying degrees of fading 
and poor quality.

At this point I'm fairly well convinced that this is an issue with Windows 
2008r2's lack of support for modern hi-res displays over RDP, possibly coupled 
with quirks of QtWebKit (for which there have been similar reports of font 
rendering issues). Given that it works fine in Windows 2012 and later and the 
fact that none of the rendering code is ours, I'm afraid it's unlikely that 
this will be fixed.


Regards,

Edson Richter


Enviado do 
Email
 para Windows 10


De: Edson Richter >
Enviado: Friday, December 1, 2017 3:34:05 PM
Para: Dave Page
Cc: Pgadmin-Support@Postgresql. Org

Assunto: RES: Faded text in pgAdmin 4 2.0/Win Server 2008r2

I’ve made some futher analisys of the problem, and found that text becomes even 
worse if I’m using RDS with 16bit colors. I’ve checked and our server is 
limited to 24 bit colors.
Maybe this is somehow related.

Regards,

Edson

Enviado do 
Email
 para Windows 10


De: Dave Page >
Enviado: Tuesday, November 28, 2017 2:29:34 PM
Para: Edson Richter
Cc: Pgadmin-Support@Postgresql. Org
Assunto: Re: Faded text in pgAdmin 4 2.0/Win Server 2008r2



On Fri, Nov 3, 2017 at 9:10 AM, Dave Page 
> wrote:
Quick update on this - no matter what interface we tried, my Windows PC (which 
claims to support 4K) refused to talk to a 4K monitor. We've therefore ordered 
a Windows laptop with 4K display. I'm travelling for the next week, but 
hopefully it should be here when I get back...

And it works just fine with Windows 10 on the 4K display, connecting to Windows 
2012. I think the only other notable environment difference is Windows 2012r2 
vs. Windows 2008r2, so my next step is to get that installed...



On Wed, Oct 18, 2017 at 1:18 PM, Dave Page 
> wrote:
Thanks. FYI, I'm now trying to test with a Windows 10 PC as the client, on a 
hi-dpi screen. Typically though, the PC and screen are refusing to talk to each 
other right now :-(. If that works, I'll have to dig out a copy of Windows 2008.

On Wed, Oct 18, 2017 at 11:18 AM, Edson Richter 
> wrote:
Also found another reference: 
https://stackoverflow.com/questions/41315873/attempting-to-resolve-blurred-tkinter-text-scaling-on-windows-10-high-dpi-disp

Regards,