yxj | 1 May 02:45 2012

Re: Test ODBC connection failed. Pleae help me to take a look. Thanks.


Hi Chris,
 
Actually I only want to test ODBC. But I didn't have any idea to test. We have pgsqlodbc installed, but I don't how to test it. Please give me some clue.
 
Thanks.
 
Grace
 
At 2012-05-01 03:54:36,"Chris Curvey" <chris <at> chriscurvey.com> wrote:
>you want psql not isql.
On Mon, Apr 30, 2012 at 3:19 PM, yxj <leaf_yxj <at> 163.com> wrote:
Hi Scott,
 
I amn't farmiliar with isql. Why I said isql is because that I did some research. they said something related to isql. No matter it's isql or psql.
 
1)How can I test the odbc function?
2) what's isql, in which circumstances , we use isql.
 
Thanks.
Regards.
 
Grace

I think Grace is trying to use the "isql" that comes with unixodbc in order to test her ODBC connection.

Grace, my isql is in /usr/bin/isql, but I'm on Ubuntu, and i think you're on CentOS.  (try "locate isql")




网易Lofter,专注兴趣,分享创作!
leaf_yxj | 1 May 02:55 2012

Re: Test ODBC connection failed. Pleae help me to take a look. Thanks.

Hi Guys:

I installed this odbc driver :psqlodbc-08.02.0400

and datadirect-x_xx. I want to test this two things work or not. 

Please give me some idea.

Thanks.
Grace

--
View this message in context: http://postgresql.1045698.n5.nabble.com/Test-ODBC-connection-failed-Pleae-help-me-to-take-a-look-Thanks-tp5676587p5677250.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

--

-- 
Sent via pgsql-general mailing list (pgsql-general <at> postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Daniel Cole | 1 May 05:04 2012

PL/R install, no pgxs available

Hi Guys,


Have 9.1.3 running with Postgis 2.0 .  Trying to add PR/R and getting some errors about my postgres install.  I found some similar messages, but none with a workable solution for me.  Any thoughts are very appreciated.

I am running USE_PGXS=1 make in my PLR directory and it returns:

Makefile:36: /usr/lib/postgresql/9.1/lib/pgxs/src/makefiles/pgxs.mk: No such file or directory
make: *** No rule to make target `/usr/lib/postgresql/9.1/lib/pgxs/src/makefiles/pgxs.mk'.  Stop.

It is correct, I have no pgxs folder under lib, must less the src and the makefiles.   I have read 35.16 in the 9.1 documentation on building the makefile for pgxs, but I really don't understand it and not sure it even relates to what I am doing.  (http://www.postgresql.org/docs/9.1/static/extend-pgxs.html)  I can't understand if I am suppose to create those directories and build up the makefiles myself (I sure hope not), or install some sort of pg dev kit or what.  

Here is my pg_config:
BINDIR = /usr/lib/postgresql/9.1/bin
DOCDIR = /usr/share/doc/postgresql-doc-9.1
HTMLDIR = /usr/share/doc/postgresql-doc-9.1
INCLUDEDIR = /usr/include/postgresql
PKGINCLUDEDIR = /usr/include/postgresql
INCLUDEDIR-SERVER = /usr/include/postgresql/9.1/server
LIBDIR = /usr/lib
PKGLIBDIR = /usr/lib/postgresql/9.1/lib
LOCALEDIR = /usr/share/locale
MANDIR = /usr/share/postgresql/9.1/man
SHAREDIR = /usr/share/postgresql/9.1
SYSCONFDIR = /etc/postgresql-common
PGXS = /usr/lib/postgresql/9.1/lib/pgxs/src/makefiles/pgxs.mk
CONFIGURE = '--with-tcl' '--with-perl' '--with-python' '--with-pam' '--with-krb5' '--with-gssapi' '--with-openssl' '--with-libxml' '--with-libxslt' '--with-ldap' '--with-tclconfig=/usr/lib/tcl8.5' '--with-tkconfig=/usr/lib/tk8.5' '--with-includes=/usr/include/tcl8.5' 'PYTHON=/usr/bin/python' '--mandir=/usr/share/postgresql/9.1/man' '--docdir=/usr/share/doc/postgresql-doc-9.1' '--sysconfdir=/etc/postgresql-common' '--datarootdir=/usr/share/' '--datadir=/usr/share/postgresql/9.1' '--bindir=/usr/lib/postgresql/9.1/bin' '--libdir=/usr/lib/' '--libexecdir=/usr/lib/postgresql/' '--includedir=/usr/include/postgresql/' '--enable-nls' '--enable-integer-datetimes' '--enable-thread-safety' '--enable-debug' '--disable-rpath' '--with-ossp-uuid' '--with-gnu-ld' '--with-pgport=5432' '--with-system-tzdata=/usr/share/zoneinfo' 'CFLAGS=-g -O2 -fPIC -DLINUX_OOM_ADJ=0 -fPIC -DLINUX_OOM_ADJ=0' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,--as-needed -Wl,--as-needed' 'CPPFLAGS='
CC = gcc
CPPFLAGS = -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/tcl8.5
CFLAGS = -g -O2 -fPIC -DLINUX_OOM_ADJ=0 -fPIC -DLINUX_OOM_ADJ=0 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wformat-security -fno-strict-aliasing -fwrapv -g
CFLAGS_SL = -fpic
LDFLAGS = -Wl,-Bsymbolic-functions -Wl,--as-needed -Wl,--as-needed -Wl,--as-needed
LDFLAGS_EX =
LDFLAGS_SL =
LIBS = -lpgport -lxslt -lxml2 -lpam -lssl -lcrypto -lkrb5 -lcom_err -lgssapi_krb5 -lz -ledit -lcrypt -ldl -lm
VERSION = PostgreSQL 9.1.3


Please tell me any ideas you have.  I am at a stand still on this.

Thanks,

Daniel



-----------------------------------------------------------
Daniel Cole

John R Pierce | 1 May 05:22 2012

Re: PL/R install, no pgxs available

On 04/30/12 8:04 PM, Daniel Cole wrote:
> Have 9.1.3 running with Postgis 2.0 .  Trying to add PR/R and getting 
> some errors about my postgres install.  I found some similar messages, 
> but none with a workable solution for me.  Any thoughts are very 
> appreciated.
>
> I am running/*USE_PGXS=1 make*/ in my PLR directory and it returns:
>
> /Makefile:36: /usr/lib/postgresql/9.1/lib/pgxs/src/makefiles/pgxs.mk 
> <http://pgxs.mk>: No such file or directory/
> /make: *** No rule to make target 
> `/usr/lib/postgresql/9.1/lib/pgxs/src/makefiles/pgxs.mk 
> <http://pgxs.mk>'.  Stop./
>
> It is correct, I have no pgxs folder under lib, must less the src and 
> the makefiles.

if this was a Fedora/Redhat/CentOS YUM install of postgres,

     yum install postgresql91-devel

-- 
john r pierce                            N 37, W 122
santa cruz ca                         mid-left coast

--

-- 
Sent via pgsql-general mailing list (pgsql-general <at> postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

John R Pierce | 1 May 05:31 2012

Re: PL/R install, no pgxs available

On 04/30/12 8:22 PM, John R Pierce wrote:
> On 04/30/12 8:04 PM, Daniel Cole wrote:
>> Have 9.1.3 running with Postgis 2.0 .  Trying to add PR/R and getting 
>> some errors about my postgres install.  I found some similar 
>> messages, but none with a workable solution for me.  Any thoughts are 
>> very appreciated.
>>
>> I am running/*USE_PGXS=1 make*/ in my PLR directory and it returns:
>>
>> /Makefile:36: /usr/lib/postgresql/9.1/lib/pgxs

oops, on the RHEL6 yum install, thats

     /usr/lib/postgresql/9.1/lib/pgxs

but as I said, that stuff is all in the -devel package, so maybe on your 
system, its something similar.

-- 
john r pierce                            N 37, W 122
santa cruz ca                         mid-left coast

--

-- 
Sent via pgsql-general mailing list (pgsql-general <at> postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Joe Conway | 1 May 06:05 2012

Re: PL/R install, no pgxs available

On 04/30/2012 06:31 PM, John R Pierce wrote:
>> On 04/30/12 8:04 PM, Daniel Cole wrote:
>>> I am running/*USE_PGXS=1 make*/ in my PLR directory and it returns:
>>>
>>> /Makefile:36: /usr/lib/postgresql/9.1/lib/pgxs
> 
> 
> oops, on the RHEL6 yum install, thats
> 
>     /usr/lib/postgresql/9.1/lib/pgxs
> 
> but as I said, that stuff is all in the -devel package, so maybe on your
> system, its something similar.

Agreed -- he is missing the development package. It isn't clear to me
how he installed postgres in the first place nor which distribution
(maybe I missed it though...), but given this I would guess that the R
development package is missing as well (needed for R headers and libR.so
I believe...)

Joe

-- 
Joe Conway
credativ LLC: http://www.credativ.us
Linux, PostgreSQL, and general Open Source
Training, Service, Consulting, & 24x7 Support

--

-- 
Sent via pgsql-general mailing list (pgsql-general <at> postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

roy hills | 1 May 10:12 2012
Picon

Re: Database upgrading: upgrade server first or client first?

> The advice I've received upon asking this question in the past is clients first then server. We are currently running many 9.1 clients against some servers awaiting upgrade
> - the most ancient of which is 7.4. The only problem (annoyance, really) is that in interactive psql sessions, a few of the "\" commands don't work with the old servers
> due to differences in the system tables and similar internal changes between versions.

Thanks for that. It ties in with what I suspected, and what I've observed in informal tests.

> Also, if putting in the effort to upgrade, consider moving to 9.1 to get all the current feature and performance benefits.

I'll probably upgrade from 8.3 to 8.4 when I've got 8.3 running and tested. 8.4 is the latest version in the standard Debian Linux package
repository for the latest stable release. But at the moment, I'll just be happy to get 8.3 working, as there have been quite a few changes
between 8.1 and 8.3 which have required changes to the application.

Matthew Churcher | 1 May 12:12 2012

Having trouble with pg_dumpall -o

Hi PostgreSQL users,

I'm having difficulty migrating a postgres 8.4.11 database to postgres
9.1.2, neither of the included pg_dumpall tools appear to honour the -o or
--oids options and fail to dump the table oids from the old database as we
require.

I've tried various combinations and orders of options including those
below:-
pg_dumpall -o -p 5432 -U postgres > dump_o.sql
pg_dumpall --oids -p 5432 -U postgres > dump_o.sql
pg_dumpall -p 5432 -U postgres -o  > dump_o.sql
pg_dumpall -p 5432 -U postgres --oids  > dump_o.sql

I'm beginning to think it could just be a bug but I'm not familiar with this
tool and wanted to run it by the community before jumping to conclusions.

Any help is appreciated!

Thanks in advanced, 
Matt

--

-- 
Sent via pgsql-general mailing list (pgsql-general <at> postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Thom Brown | 1 May 12:22 2012
Picon

Re: Having trouble with pg_dumpall -o

On 1 May 2012 11:12, Matthew Churcher <Matthew.Churcher <at> realvnc.com> wrote:
> Hi PostgreSQL users,
>
> I'm having difficulty migrating a postgres 8.4.11 database to postgres
> 9.1.2, neither of the included pg_dumpall tools appear to honour the -o or
> --oids options and fail to dump the table oids from the old database as we
> require.
>
> I've tried various combinations and orders of options including those
> below:-
> pg_dumpall -o -p 5432 -U postgres > dump_o.sql
> pg_dumpall --oids -p 5432 -U postgres > dump_o.sql
> pg_dumpall -p 5432 -U postgres -o  > dump_o.sql
> pg_dumpall -p 5432 -U postgres --oids  > dump_o.sql

I can confirm that pg_dumpall's -o option doesn't appear to work, but
pg_dump's -o does.  This looks like a bug to me, especially since it
also doesn't produce the WITH OIDS option on the CREATE TABLE
statement for tables which do have OIDs.

-- 
Thom

--

-- 
Sent via pgsql-general mailing list (pgsql-general <at> postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Willy-Bas Loos | 1 May 12:36 2012
Picon

Re: how robust are custom dumps?

great stuff!
was that already in it?
i'd plea for adding recognition of gzipped data too..

cheers,

WBL

On Wed, Apr 25, 2012 at 11:05 PM, Guillaume Lelarge <guillaume <at> lelarge.info> wrote:
On Wed, 2012-04-25 at 10:40 +0200, Willy-Bas Loos wrote:
> On Wed, Apr 25, 2012 at 9:51 AM, Magnus Hagander <magnus <at> hagander.net>wrote:
>
> > We used to have a bug/lackoffeature in pg_dump at the 2GB boundary as
> > well, IIRC, specifically on Win32. Maybe you were hit by that one..
>
> Yes, possibly. I didn't even know how to make a compressed plain dump, but
> that doesn't really plea my case :/
>
>
> > > i do have one suggestion.
> > > pg_restore only gives a user this feedback, when he makes this
> > > mistake:"pg_restore: [archiver] input file does not appear to be a valid
> > > archive".
> > >
> > > Would it be feasible for pg_restore to detect that it is a different
> > pg_dump
> > > format and inform the user about it?
> >
> >
> The main one you'd want to detect is plain I think - and I don't know
> > if we can reliably detect that. It could be just a generic textfile,
> > after all - how would we know the difference?
> >
>
>
>
> Well, on linux you could make pg_dump run /usr/bin/file on the file to see
> what kind it is. If it is gzipped, suggest that it might be a gzipped plain
> dump, if it is plain text, suggest that it might be a plain  dump (etc,
> also bzip2). That's all.
> You don't have to be sure that it is valid, just say a bit more than "does
> not appear to be a valid archive". Help a user in a bad situation.
>
> Only, i know that postgres runs on many platforms, so you probably can't
> run /usr/bin/file on all of those (or might not be installed on linux
> machine). So it probably should be part of pg_restore itself.
>

pg_restore will do so for plain backups on 9.2:

$ pg_dump b1 > b1.dump
$ pg_restore -d b2 b1.dump
pg_restore: [archiver] input file appears to be a text format dump.
Please use psql.


--
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com




--
"Quality comes from focus and clarity of purpose" -- Mark Shuttleworth


Gmane