
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
github.com/dolthub/pg2mysql
pg2mysql transforms a pgdump file on STDIN into a MySQL dump file on
STDOUT. Dump format must be INSERT
statements, not binary or COPY
statements (ie. pg_dump --insert <dbname>
).
Usage:
./pg2mysql.pl < file.pgdump > mysql.sql
./pg2mysql.pl --skip table1 --skip table2 --insert_ignore < file.pgdump > mysql.sql 2>warnings.txt
It handles:
CREATE TABLE
statements, types converted to MySQL equivalentsINSERT INTO
statements, some values (like timestamp strings)
massaged to work with MySQLCREATE INDEX
statementsALTER TABLE
statements (for foreign keys, other constraints)nextval
column defaults translated to auto_increment
INSERT IGNORE
statements to be more
lenient with non-confirming values (at the cost of import accuracy)All other statement types other than the ones above are ignored, and
echoed as SQL comments to STDERR. If you want them in your final
script, redirect STDERR to STDOUT with 2 >&1
when running the
script.
The script has a lot of limitations and there are surely bugs. If you find some, file an issue to tell us. But these are the things we know about:
You must have Perl installed at /usr/bin/perl
to run the script directly.
pg2mysql is heavily inspired and informed by this project of the same name: https://github.com/ChrisLundquist/pg2mysql
Which in turn was adapated from this web form: http://www.lightbox.ca/pg2mysql.php
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.