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);
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
On Wed, 10 Sep 2003 09:23:46 +0100
Richard Huxton <dev@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 )??
Show quoted text
--
Richard Huxton
Archonet Ltd---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org