473,385 Members | 1,983 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

SUMMARY mysql -> psql


This is what I finally ended up with, thanks to those who helped get me here.


--
-- PostgreSQL database dump
-- pg_dump -d -c -s dbname
--

\connect - username

SET search_path = public, pg_catalog;

ALTER TABLE ONLY public.inbound DROP CONSTRAINT inbound_pkey;
ALTER TABLE ONLY public.outbound DROP CONSTRAINT id;
DROP TABLE public.inbound;
DROP TABLE public.outbound;
DROP SEQUENCE public.serial8;
DROP SEQUENCE public.serial;
DROP TABLE public.ports;
--
-- TOC entry 4 (OID 119511)
-- Name: ports; Type: TABLE; Schema: public; Owner: username
--

CREATE TABLE ports (
port integer DEFAULT 0 NOT NULL,
protocol text DEFAULT 'tcp' NOT NULL,
service character(50) DEFAULT '' NOT NULL,
description character(100) DEFAULT ''
);
--
-- TOC entry 2 (OID 119520)
-- Name: serial; Type: SEQUENCE; Schema: public; Owner: username
--

CREATE SEQUENCE serial
START 1
INCREMENT 1
MAXVALUE 9223372036854775807
MINVALUE 1
CACHE 1;
--
-- TOC entry 3 (OID 119522)
-- Name: serial8; Type: SEQUENCE; Schema: public; Owner: username
--

CREATE SEQUENCE serial8
START 1
INCREMENT 1
MAXVALUE 9223372036854775807
MINVALUE 1
CACHE 1;
--
-- TOC entry 5 (OID 119536)
-- Name: outbound; Type: TABLE; Schema: public; Owner: username
--

CREATE TABLE outbound (
source character(100) DEFAULT '',
destination character(100) DEFAULT '',
sport integer DEFAULT 0 NOT NULL,
dport integer DEFAULT 0 NOT NULL,
"time" timestamp without time zone DEFAULT now() NOT NULL,
id bigint DEFAULT nextval('serial'::text) NOT NULL
);
--
-- TOC entry 6 (OID 119554)
-- Name: inbound; Type: TABLE; Schema: public; Owner: username
--

CREATE TABLE inbound (
source character(100) DEFAULT '',
destination character(100) DEFAULT '',
sport integer DEFAULT 0 NOT NULL,
dport integer DEFAULT 0 NOT NULL,
"time" timestamp without time zone DEFAULT now() NOT NULL,
id bigint DEFAULT nextval('serial'::text) NOT NULL
);
--
-- TOC entry 7 (OID 119544)
-- Name: id; Type: CONSTRAINT; Schema: public; Owner: username
--

ALTER TABLE ONLY outbound
ADD CONSTRAINT id PRIMARY KEY (id);
--
-- TOC entry 8 (OID 119562)
-- Name: inbound_pkey; Type: CONSTRAINT; Schema: public; Owner: username
--

ALTER TABLE ONLY inbound
ADD CONSTRAINT inbound_pkey PRIMARY KEY (id);

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 11 '05 #1
3 2700
On Wed, 10 Sep 2003 09:23:46 +0100
Richard Huxton <de*@archonet.com> wrote:
On Wednesday 10 September 2003 03:33, expect wrote:
CREATE TABLE outbound (
source character(100) DEFAULT '',
destination character(100) DEFAULT '',
sport integer DEFAULT 0 NOT NULL,
dport integer DEFAULT 0 NOT NULL,
"time" timestamp without time zone DEFAULT now() NOT NULL,
id bigint DEFAULT nextval('serial'::text) NOT NULL
);
I'm guessing it's too late in the day to change it now, but I'd be sorely
tempted to rename that "time" column to something else (otime?)

Never too late, this is a little pet project. I'm trying to make a util,
written to work with MySql, to work with Pgql.

It's called Link-n-Log (int that cute) and it's for logging the in/out
traffic from a Linksys fw/router befsr4xx. http://link-n-log.sourceforge.net
Now I wonder if anyone here has done any Pgql stuff with Qt from
( http://trolltech.com )??
--
Richard Huxton
Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 11 '05 #2
On Wednesday 10 September 2003 03:33, expect wrote:
CREATE TABLE outbound (
source character(100) DEFAULT '',
destination character(100) DEFAULT '',
sport integer DEFAULT 0 NOT NULL,
dport integer DEFAULT 0 NOT NULL,
"time" timestamp without time zone DEFAULT now() NOT NULL,
id bigint DEFAULT nextval('serial'::text) NOT NULL
);


I'm guessing it's too late in the day to change it now, but I'd be sorely
tempted to rename that "time" column to something else (otime?)
--
Richard Huxton
Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 11 '05 #3
On Wed, 10 Sep 2003 09:23:46 +0100
Richard Huxton <de*@archonet.com> wrote:
On Wednesday 10 September 2003 03:33, expect wrote:
CREATE TABLE outbound (
source character(100) DEFAULT '',
destination character(100) DEFAULT '',
sport integer DEFAULT 0 NOT NULL,
dport integer DEFAULT 0 NOT NULL,
"time" timestamp without time zone DEFAULT now() NOT NULL,
id bigint DEFAULT nextval('serial'::text) NOT NULL
);
I'm guessing it's too late in the day to change it now, but I'd be sorely
tempted to rename that "time" column to something else (otime?)

Never too late, this is a little pet project. I'm trying to make a util,
written to work with MySql, to work with Pgql.

It's called Link-n-Log (int that cute) and it's for logging the in/out
traffic from a Linksys fw/router befsr4xx. http://link-n-log.sourceforge.net
Now I wonder if anyone here has done any Pgql stuff with Qt from
( http://trolltech.com )??
--
Richard Huxton
Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 11 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Charles Alexander | last post by:
Hello I need some help redisplaying and formatting data from a MySQl DB. So far using PHP, I have the (partial for this example) data list: Sample_ID Marker_ID Variation ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.