pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
running a batch script
4+ messages / 3 participants
[nested] [flat]

* running a batch script
@ 2020-06-19 15:30 Richard Bernstein <richb201@gmail.com>
  2020-06-19 16:08 ` Re: running a batch script Paul Förster <paul.foerster@gmail.com>
  2020-06-19 18:32 ` Re: running a batch script Adrian Klaver <adrian.klaver@aklaver.com>
  0 siblings, 2 replies; 4+ messages in thread

From: Richard Bernstein @ 2020-06-19 15:30 UTC (permalink / raw)
  To: pgsql-general

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 easiest way to
create this sample table? I have one table that I have 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.

Attachments:

  mysql_db.sql (application/sql, 234.5K) download

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: running a batch script
  2020-06-19 15:30 running a batch script Richard Bernstein <richb201@gmail.com>
@ 2020-06-19 16:08 ` Paul Förster <paul.foerster@gmail.com>
  2020-06-19 16:19   ` Re: running a batch script Richard Bernstein <richb201@gmail.com>
  1 sibling, 1 reply; 4+ messages in thread

From: Paul Förster @ 2020-06-19 16:08 UTC (permalink / raw)
  To: Richard Bernstein <richb201@gmail.com>; +Cc: pgsql-general

Hi,

> On 19. Jun, 2020, at 17:30, Richard Bernstein <richb201@gmail.com> wrote:
> <mysql_db.sql>

thanks for posting all private data to a public list!

Can some list admin please delete at least the attached script? It contains lots of private data.

No wonder, there are millions and millions of leaked personal information records on the net if, to put it mildly, some naive people post them publicly. Not even a slight hack into some site is needed to get such things these days.

What a world. :-(

Cheers,
Paul




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: running a batch script
  2020-06-19 15:30 running a batch script Richard Bernstein <richb201@gmail.com>
  2020-06-19 16:08 ` Re: running a batch script Paul Förster <paul.foerster@gmail.com>
@ 2020-06-19 16:19   ` Richard Bernstein <richb201@gmail.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Richard Bernstein @ 2020-06-19 16:19 UTC (permalink / raw)
  To: Paul Förster <paul.foerster@gmail.com>; +Cc: pgsql-general

You're welcome. It is not real data: It was just a sample.

On Fri, Jun 19, 2020 at 12:08 PM Paul Förster <paul.foerster@gmail.com>
wrote:

> Hi,
>
> > On 19. Jun, 2020, at 17:30, Richard Bernstein <richb201@gmail.com>
> wrote:
> > <mysql_db.sql>
>
> thanks for posting all private data to a public list!
>
> Can some list admin please delete at least the attached script? It
> contains lots of private data.
>
> No wonder, there are millions and millions of leaked personal information
> records on the net if, to put it mildly, some naive people post them
> publicly. Not even a slight hack into some site is needed to get such
> things these days.
>
> What a world. :-(
>
> Cheers,
> Paul

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: running a batch script
  2020-06-19 15:30 running a batch script Richard Bernstein <richb201@gmail.com>
@ 2020-06-19 18:32 ` Adrian Klaver <adrian.klaver@aklaver.com>
  1 sibling, 0 replies; 4+ messages in thread

From: Adrian Klaver @ 2020-06-19 18:32 UTC (permalink / raw)
  To: Richard Bernstein <richb201@gmail.com>; pgsql-general

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





^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2020-06-19 18:32 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-06-19 15:30 running a batch script Richard Bernstein <richb201@gmail.com>
2020-06-19 16:08 ` Paul Förster <paul.foerster@gmail.com>
2020-06-19 16:19   ` Richard Bernstein <richb201@gmail.com>
2020-06-19 18:32 ` Adrian Klaver <adrian.klaver@aklaver.com>

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