From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Richard Bernstein <richb201@gmail.com>
To: pgsql-general@postgresql.org
Subject: Re: running a batch script
Date: Fri, 19 Jun 2020 11:32:17 -0700
Message-ID: <58e1b1c5-a3e8-3e28-9edd-e00d91394fbd@aklaver.com> (raw)
In-Reply-To: <CAKXm1c0P74doi5u-OEsWuCoB2zD=MS49oeqHpGLD_GE4rpds4A@mail.gmail.com>
References: <CAKXm1c0P74doi5u-OEsWuCoB2zD=MS49oeqHpGLD_GE4rpds4A@mail.gmail.com>
On 6/19/20 8:30 AM, Richard Bernstein wrote:
> I am trying to test out a package called phpGrid and I need to run
> through its tutorial. But there are some "kinks". I am developing on my
> ubuntu laptop in a docker container. The postgresql I need to test-to is
> AWS RDS Postgresql. I have an account and Server and can access it with
> pgAdmin. The install instructs for phpGrid asked me to modify conf.php.
> In my case I used app.conf which sets up the virtual host. I restarted
> the containers. Next the tutorial wants me to "run" an sql batch script
> to create the table. The batch script is pretty mySQL centric. I am
> attaching it.
>
> Can I run this from pgAdmin the same way I would with phpMyAdmin in
> mySQL? Do I need to modify the script for postgresql? Is this the
Yes. This script is definitely MySQL specific. Some examples:
USE `sampledb`;
CREATE TABLE `changes` (
`n_r` int(11) NOT NULL AUTO_INCREMENT, <--That would be SERIAL or
IDENTITY.
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; <--No go.
UNLOCK TABLES;
and so on.
> easiest way to create this sample table? I have one table that I have
Take a look at:
https://pgloader.readthedocs.io/en/latest/ref/mysql.html> created in pgAdmin called called imagesdatabase and I'd prefer not to
> break that since it took some time with AWS support to get that going.
--
Adrian Klaver
adrian.klaver@aklaver.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: adrian.klaver@aklaver.com, richb201@gmail.com
Subject: Re: running a batch script
In-Reply-To: <58e1b1c5-a3e8-3e28-9edd-e00d91394fbd@aklaver.com>
References: <CAKXm1c0P74doi5u-OEsWuCoB2zD=MS49oeqHpGLD_GE4rpds4A@mail.gmail.com> <58e1b1c5-a3e8-3e28-9edd-e00d91394fbd@aklaver.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox