Psql -h. -U demo_user -d dev -p 5439 -f d:\demo\redshift_script.sql -L d:\demo\log_redshift_script.logĪll commands in redshift_script.sql file would get executed in PSQL and logs will be stored in log_redshift_script. Make sure to change below parameters highlighted in red for your cluster endpoint, userid, copy script file name and log script file name respectively In fact, pgcli autocompletion is smart enough to only show table names after FROM in a SQL statement. pgcli offers more powerful features than psql (the default terminal front-end for PostgreSQL) such as: Autocompletion. Make sure to add this to your PATH environment variable pgcli is a command line tool that lets devs examine PostgreSQL databases from the command line. Select command line tools as shown in below screenshot and install thatĪbove will install postgres12 command line in below folder C:\Program Files\PostgreSQL\12\bin. Run the installer which will take few minutes and prompt you for installations options Personally I find unzip to be the best "installer" anyway (I also use that to install the Postgres server, the Windows installer just has too many quirks)īelow are the steps I followed to connect to Amazon Redshift with postgres12 psql on windows:ĭownload postgres 12.4 from below location: It is obviously not a real installer, but if you put the cleaned up directory into a ZIP file, you can distribute that and whoever needs it just unzips the archive. Does mycli work on Windows Yes I have personally. Of course you can also take all that from an existing Postgres installation without the need to download the ZIP archive. So this app exists because Jonathan was kind enough to request my feedback. iconv.dll (libiconv-2.dll in newer Postgres versions).So that leaves you with these files (from the bin directory) that are required for the psql client: But you can overcome that as well by simply putting the MSVCR120.DLL from some computer where it is installed into the bin directory. One drawback of this approach is that this requires the Visual C++ Redistributable to be installed. If you do want some of the other client tools, you might want to keep The libxml2.dll and libxslt.dll are also only needed for the server. You can also remove all wx*.dll files, they are only needed for pgAdmin. here true is just made up, I don't fully understand the OID situation and in particular how pgcli interacts with it here I suspect that those missing dictionary entries are supposed to be created elsewhere, as this used to work before without this, and I don't know if some other setup is done related to those entries. Inside the bin directory you can essentially remove all. I think the share directory could be needed for localized error messages in psql but I'm not sure about that. As far as I can tell (but I am not sure) the client also doesn't need the share or lib directories, but you would need to test that. You can remove the doc, include, pgAdmin III, StackBuilder and symbols directories. When you unzip it, you get the following directories: What you can do, is to download the ZIP archive of the complete Postgres binaries:Īnd then remove the "server" part from it. Unfortunately there is no real client "only" installer.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |