Lists: | pgsql-novice |
---|
From: | Cheryl Thompson <cthompso(at)ci(dot)irving(dot)tx(dot)us> |
---|---|
To: | "'pgsql-novice(at)postgresql(dot)org'" <pgsql-novice(at)postgresql(dot)org> |
Cc: | 'Tom Lane' <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Subject: | Re: Had to drop some table columns, managed to annoy MS |
Date: | 2003-01-13 23:04:35 |
Message-ID: | A459454B7510D611AAAC0008C716CA10036D1D97@BIGGUY |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-novice |
Is there a way to copy/export the DB (or it's tables) to another DB and dump
all this stuff that's causing the problems? In particular, in the past I
have exported the entirety of a database into a flat file and imported it
into a "clean" version. Admittedly, it's been a while and that was for an
app using DB2 which didn't have a lot of built in tools, but the theory
applies...
B/c building an ODBC driver is WAYYYY beyond 1)my skills and 2)the project
timescale on this. I need to have this particular issue fixed tomorrow
morning; if rebuilding the DB is the quickest way, I will do that, but I was
hoping for a quicker (and less destructive) work around...
Cheryl
-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
Cheryl Thompson <cthompso(at)ci(dot)irving(dot)tx(dot)us> writes:
> All my installs and drivers are the newest official releases that were
> available as of Dec 29, 2002. (IE 2 weeks ago)...
I looked at the psqlodbc CVS logs, and this was claimed to be fixed on 6
Dec --- but apparently there hasn't been a release put out since 29 Nov.
I'd suggest pestering the ODBC guys for a new release (pgsql-odbc
mailing list is probably a good place). Or pull the CVS-tip sources and
build it yourself.
-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
Cheryl Thompson <cthompso(at)ci(dot)irving(dot)tx(dot)us> writes:
> I'm getting the following:
> '..............pg.dropped.8........................' is not a valid name.
Are you using an up-to-date ODBC driver? It looks like the one you have
is not aware of the attisdropped column in pg_attribute ...
From: | Lex Berezhny <LBerezhny(at)DevIS(dot)com> |
---|---|
To: | Cheryl Thompson <cthompso(at)ci(dot)irving(dot)tx(dot)us> |
Cc: | "'pgsql-novice(at)postgresql(dot)org'" <pgsql-novice(at)postgresql(dot)org>, 'Tom Lane' <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Subject: | Re: Had to drop some table columns, managed to annoy MS |
Date: | 2003-01-13 23:12:31 |
Message-ID: | 1042499551.16263.24.camel@hortus |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-novice |
Use the pg_dump command:
$ pg_dump DBNAME > FILENAME.sql
pg_dump takes the same parameters as psql, so if you have to connect to
an external db then you can specify it in a similar fashion to pg_dump.
i hope this helps.
good luck,
- lex
On Mon, 2003-01-13 at 18:04, Cheryl Thompson wrote:
> Is there a way to copy/export the DB (or it's tables) to another DB and dump
> all this stuff that's causing the problems? In particular, in the past I
> have exported the entirety of a database into a flat file and imported it
> into a "clean" version. Admittedly, it's been a while and that was for an
> app using DB2 which didn't have a lot of built in tools, but the theory
> applies...
>
> B/c building an ODBC driver is WAYYYY beyond 1)my skills and 2)the project
> timescale on this. I need to have this particular issue fixed tomorrow
> morning; if rebuilding the DB is the quickest way, I will do that, but I was
> hoping for a quicker (and less destructive) work around...
>
> Cheryl
>
> -----Original Message-----
> From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
>
> Cheryl Thompson <cthompso(at)ci(dot)irving(dot)tx(dot)us> writes:
> > All my installs and drivers are the newest official releases that were
> > available as of Dec 29, 2002. (IE 2 weeks ago)...
>
> I looked at the psqlodbc CVS logs, and this was claimed to be fixed on 6
> Dec --- but apparently there hasn't been a release put out since 29 Nov.
> I'd suggest pestering the ODBC guys for a new release (pgsql-odbc
> mailing list is probably a good place). Or pull the CVS-tip sources and
> build it yourself.
>
> -----Original Message-----
> From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
>
> Cheryl Thompson <cthompso(at)ci(dot)irving(dot)tx(dot)us> writes:
> > I'm getting the following:
> > '..............pg.dropped.8........................' is not a valid name.
>
> Are you using an up-to-date ODBC driver? It looks like the one you have
> is not aware of the attisdropped column in pg_attribute ...
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
From: | "Juliet May" <jmay(at)speark(dot)com> |
---|---|
To: | "Cheryl Thompson" <cthompso(at)ci(dot)irving(dot)tx(dot)us>, <pgsql-novice(at)postgresql(dot)org> |
Subject: | Re: Had to drop some table columns, managed to annoy MS |
Date: | 2003-01-13 23:12:40 |
Message-ID: | 014d01c2bb59$45011ee0$a1d2a8c0@impsu.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-novice |
I use pgadmin II to access postgresql and they have a sweet little plugin
called the Database Migration Wizard which lets you export access tables as
well as a variety of others. It uses the odbc driver so I don't know if it
will work around your problem but it might be a try. Either way, I find
pgAdmin II makes my life a lot simpler when it comes to working with
postgresql.
Julie
----- Original Message -----
From: "Cheryl Thompson" <cthompso(at)ci(dot)irving(dot)tx(dot)us>
> Is there a way to copy/export the DB (or it's tables) to another DB and
dump
> all this stuff that's causing the problems? In particular, in the past I
> have exported the entirety of a database into a flat file and imported it
> into a "clean" version.
From: | Josh Berkus <josh(at)agliodbs(dot)com> |
---|---|
To: | Cheryl Thompson <cthompso(at)ci(dot)irving(dot)tx(dot)us>, "'pgsql-novice(at)postgresql(dot)org'" <pgsql-novice(at)postgresql(dot)org> |
Cc: | 'Tom Lane' <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Subject: | Re: Had to drop some table columns, managed to annoy MS |
Date: | 2003-01-13 23:18:09 |
Message-ID: | 200301131518.09041.josh@agliodbs.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-novice |
Cheryl,
> Is there a way to copy/export the DB (or it's tables) to another DB and dump
> all this stuff that's causing the problems? In particular, in the past I
> have exported the entirety of a database into a flat file and imported it
> into a "clean" version. Admittedly, it's been a while and that was for an
> app using DB2 which didn't have a lot of built in tools, but the theory
> applies...
Sure. Use pg_dump. See the docs under "Server Programs" or your favorite
PostgreSQL book.
--
-Josh Berkus
Aglio Database Solutions
San Francisco
From: | "Juliet May" <jmay(at)speark(dot)com> |
---|---|
To: | <pgsql-novice(at)postgresql(dot)org> |
Subject: | PostgreSQL query failed: pqReadData() -- read() failed: errno=0 |
Date: | 2003-01-14 16:35:29 |
Message-ID: | 007401c2bbea$f3c572a0$a1d2a8c0@impsu.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-novice |
I'm at a total loss! My application was running fine and I didn't change
anything and my coworker claims he didn't change anything then I started
getting the following error. I looked through the archives for a similar
problem and found that either a.) I didn't understand what caused the
problem or the solution or b.) My scenario is different than the one
mentioned in the archives. I am running Postgresql 7.2 in a cygwin
environment on an NT machine. I don't want to spend a lot of time
troubleshooting if it is a Windows problem since we are in the process of
setting up a Linux machine to handle Postgresql and PHP. Let me know if you
need more info to help identify the problem. Thanks in advance for any help
you can provide.
Julie
/*Error message on page*/
Warning: PostgreSQL query failed: pqReadData() -- read() failed: errno=0 No
error in c:\php\includes\db_pgsql.inc on line 69
Database error: Invalid SQL: select val from active_sessions where sid =
'0e0460e75e2fc7783b9c991e14e3af9f' and name = 'Agtrac_Session'
PostgreSQL Error: 1 (pqReadData() -- read() failed: errno=0 No error )
Session halted.
/* snippet from db_pgsql.inc including line 69 (marked) below */
function query($Query_String) {
/* No empty queries, please, since PHP4 chokes on them. */
if ($Query_String == "")
/* The empty query string is passed on from the constructor,
* when calling the class without a query, e.g. in situations
* like these: '$db = new DB_Sql_Subclass;'
*/
return 0;
$this->connect();
if ($this->Debug)
printf("<br>Debug: query = %s<br>\n", $Query_String);
/* line 69 */ $this->Query_ID = pg_Exec($this->Link_ID, $Query_String);
$this->Row = 0;
$this->Error = pg_ErrorMessage($this->Link_ID);
$this->Errno = ($this->Error == "")?0:1;
if (!$this->Query_ID) {
$this->halt("Invalid SQL: ".$Query_String);
}
return $this->Query_ID;
}