[GENERAL] Mixing use of ECPG and libpq

2009-09-10 Thread Nathaniel
Hello all, I'm trying to write a postgres client application in C. I'm having to make use of some existing in-house code that soley uses ECPG to interact with a number of databases. However, I need to exploit some lower-level libpq functionality directly. Does anyone know how I can get hold of

[GENERAL] array datatype supported by Perl DBI with Postgres DBD ?

2009-09-10 Thread Gauthier, Dave
Does anyone know if the Postgres DBD for the Perl DBI supports the array datatype? Thanks in Advance !

Re: [GENERAL] Adding integers ( > 8 bytes) to an inet

2009-09-10 Thread Kristian Larsson
On Tue, Sep 08, 2009 at 05:11:02PM +0100, Sam Mason wrote: > On Tue, Sep 08, 2009 at 05:58:01PM +0200, Kristian Larsson wrote: > > On Tue, Sep 08, 2009 at 11:37:02AM -0400, Tom Lane wrote: > > > I think the whole thing is a bit of a crock; adding integers to inet > > > addresses doesn't make a lot

Re: [GENERAL] Adding integers ( > 8 bytes) to an inet

2009-09-10 Thread Tom Lane
Kristian Larsson writes: > Do we > a) ignore it and let users use the workarounds? > b) add a next_address() as per Toms suggestion ? > c) add a conversation between NUMERIC and INET so one can add a > NUMERIC to an INET just as is possible today with INTEGERs? I vote for (a). It was already poi

[GENERAL] "show all" command crashes server

2009-09-10 Thread Grant Maxwell
Hi folks First time poster here so please extend grace if I don't initially provide what is needed to help. I am running postgresql 8.3.7 on debian lenny (postgresql-8.3_8.3.7-0lenny1_i386.deb). I have three of these servers and generally they run well. On this one server if I use the co

Re: [DOCS] [GENERAL] What happens when syslog gets blocked?

2009-09-10 Thread Alvaro Herrera
Alvaro Herrera wrote: > decibel wrote: > > On Aug 6, 2009, at 2:00 PM, Bill Moran wrote: > > > >Well ... "life better" really depends on which failure scenario you're > > >more comfortable with ... personally, I'd rather lose log messages > > >than > > >have the DB system go down. Of course, if a

Re: [GENERAL] "show all" command crashes server

2009-09-10 Thread Richard Huxton
Grant Maxwell wrote: > Hi folks > > First time poster here so please extend grace if I don't initially > provide what is needed to help. > > I am running postgresql 8.3.7 on debian lenny > (postgresql-8.3_8.3.7-0lenny1_i386.deb) Well that's useful. > I have three of these servers and generally

Re: [GENERAL] Adding integers ( > 8 bytes) to an inet

2009-09-10 Thread Sam Mason
On Thu, Sep 10, 2009 at 10:30:49AM -0400, Tom Lane wrote: > Kristian Larsson writes: > > Do we > > c) add a conversation between NUMERIC and INET so one can add a > > NUMERIC to an INET just as is possible today with INTEGERs? > > Proposal (c) is disingenuous because it ignores the fact that NUME

Re: [GENERAL] array datatype supported by Perl DBI with Postgres DBD ?

2009-09-10 Thread Vick Khera
On Thu, Sep 10, 2009 at 9:41 AM, Gauthier, Dave wrote: > Does anyone know if the Postgres DBD for the Perl DBI supports the array > datatype? I use numeric array columns with DBD::Pg. What do you define as "support"? -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] array datatype supported by Perl DBI with Postgres DBD ?

2009-09-10 Thread Gauthier, Dave
I plan to use text arrays. I have an old O'Reilly "Programming the Perl DBI" and it doesn't mention supoprt of these things. I suppose that this might be because some DBs don't support them. But PG does, and I was wondering how it would pass column data which is an array when using something l

Re: [GENERAL] "show all" command crashes server

2009-09-10 Thread Scott Marlowe
On Thu, Sep 10, 2009 at 8:37 AM, Grant Maxwell wrote: > Hi folks > First time poster here so please extend grace if I don't initially provide > what is needed to help. > I am running postgresql 8.3.7 on debian lenny > (postgresql-8.3_8.3.7-0lenny1_i386.deb). > I have three of these servers and gene

Re: [GENERAL] WAL archiving file name collision

2009-09-10 Thread Tom Lane
Berge Schwebs =?utf-8?Q?Bj=C3=B8rlo?= writes: > Recently, WAL archiving begain failing on the test which checks wether the > file exists. This first occured two hours after an incident where someone > edited pg_hba.conf and left it with permissions denying Postgres read access > to it. Upon SIGHU

Re: [GENERAL] query speed question

2009-09-10 Thread Christopher Condit
Hi Alban- > > I have two tables that are georeferenced (although in this case I'm > > not using PostGIS) that I need to join. > > A ( lat | lon | depth | value) > > |A| = 1,100,000 > > > > B ( lat | lon | attributes) > > |B| = 14,000,000 > > > > A is a special case because the lat / lon values are

Re: [GENERAL] array datatype supported by Perl DBI with Postgres DBD ?

2009-09-10 Thread Michael Andreen
On Thursday 10 September 2009 18:28:28 Gauthier, Dave wrote: > I have an old O'Reilly "Programming the Perl DBI" and it doesn't mention > supoprt of these things. I suppose that this might be because some DBs > don't support them. But PG does, and I was wondering how it would pass > column data wh

Re: [GENERAL] COPY command character set

2009-09-10 Thread Peter Headland
> set client_encoding = 'utf8'; > copy from stdin/to stdout; What if I want to do this on the server side (because it's much, much faster)? Does COPY use the default encoding of the database? If not, what? If this is a restrictive as it appears, and there are no outstanding enhancements planned i

Re: [GENERAL] COPY command character set

2009-09-10 Thread Tom Lane
"Peter Headland" writes: >> set client_encoding = 'utf8'; >> copy from stdin/to stdout; > What if I want to do this on the server side (because it's much, much > faster)? Does COPY use the default encoding of the database? If not, > what? > If this is a restrictive as it appears, and there are n

Re: [GENERAL] query speed question

2009-09-10 Thread Alban Hertroys
On 10 Sep 2009, at 19:09, Christopher Condit wrote: Here are both queries (with explain analyze): EXPLAIN ANALYZE SELECT B.* FROM B, (SELECT lat, lon FROM A WHERE value > 0 AND value < 2 AND depth = 0) AS foo WHERE getwoalatitude(B.latitude::numeric) = foo.lat AND getwoalongitude(B.longitud

Re: [GENERAL] COPY command character set

2009-09-10 Thread Peter Headland
> The COPY command reference page saith > >Input data is interpreted according to the current client encoding, >and output data is encoded in the the current client encoding, even >if the data does not pass through the client but is read from or >written to a file. Rats - I read th

Re: [GENERAL] COPY command character set

2009-09-10 Thread Adrian Klaver
- "Peter Headland" wrote: > > The COPY command reference page saith > > > >Input data is interpreted according to the current client > encoding, > >and output data is encoded in the the current client encoding, > even > >if the data does not pass through the client but is read fr

[GENERAL] Unable to drop a table due to seemingly non-existent dependencies

2009-09-10 Thread David Brain
Hi, I have a situation where trying to drop a table results in: #drop table cdrimporterror_old; NOTICE: default for table cdrimporterror column cdrimporterrorid depends on sequence cdrimporterror_cdrimporterrorid_seq ERROR: cannot drop table cdrimporterror_old because other objects depend on it

Re: [GENERAL] COPY command character set

2009-09-10 Thread Tom Lane
"Peter Headland" writes: > How about my suggestion to add a means (extend COPY syntax) to specify > encoding explicitly and handle UTF lead bytes - would that be of > interest? There are no lead bytes in UTF-8, and we make no pretense of handling UTF-16, so I don't think we'd be interested in som

[GENERAL] Getting the oid of an anyelement

2009-09-10 Thread Scott Bailey
If I've got a function (sql or plpgsql) that takes anyelement as a param, how do I determine the type name or oid that was actually passed in? I figure there is probably a function for this but darn if I can find it. Specifically, I'm trying to make a function like Oracle's dump that will tak

Re: [GENERAL] COPY command character set

2009-09-10 Thread Peter Headland
> There are no lead bytes in UTF-8 Sorry, sloppy use of terminology. I should have said "UTF signatures" aka the "byte order mark". IOW, the "magic number" bytes commonly found at the front of UTF encoded files: UTF-16 little-endian FF FE UTF-16 big-endian FE FF UTF-8 EF BB BF These tend t

Re: [GENERAL] COPY command character set

2009-09-10 Thread Peter Headland
> Maybe the link might help? > > http://www.postgresql.org/docs/8.4/interactive/multibyte.html That page is too generic; what would be helpful is a section in the doc for each command that is affected by I18N/L10N considerations, that identifies how that specific command behaves. Now that I ha

Re: [GENERAL] Getting the oid of an anyelement

2009-09-10 Thread Pavel Stehule
Hello please, try to look on function pg_typeof postgres=# CREATE OR REPLACE FUNCTION x(anyelement) RETURNS oid AS $$ SELECT pg_typeof($1)::oid; $$ LANGUAGE sql; CREATE FUNCTION postgres=# select x(10); x 23 (1 row) postgres=# select x(current_date); x -- 1082 (1 row) postgres=#

Re: [GENERAL] Unable to drop a table due to seemingly non-existent dependencies

2009-09-10 Thread Richard Huxton
David Brain wrote: > Hi, > > I have a situation where trying to drop a table results in: > > #drop table cdrimporterror_old; > NOTICE: default for table cdrimporterror column cdrimporterrorid > depends on sequence cdrimporterror_cdrimporterrorid_seq > ERROR: cannot drop table cdrimporterror_old

Re: [GENERAL] Unable to drop a table due to seemingly non-existent dependencies

2009-09-10 Thread Tom Lane
David Brain writes: > I have a situation where trying to drop a table results in: > #drop table cdrimporterror_old; > NOTICE: default for table cdrimporterror column cdrimporterrorid > depends on sequence cdrimporterror_cdrimporterrorid_seq > ERROR: cannot drop table cdrimporterror_old because

Re: [GENERAL] Getting the oid of an anyelement

2009-09-10 Thread Tom Lane
Scott Bailey writes: > Specifically, I'm trying to make a function like Oracle's dump that will > take anything as input and return the internal representation of it. So > I want to determine what type was passed in and call the appropriate > send function. You would need to write that in C.

Re: [GENERAL] Getting the oid of an anyelement

2009-09-10 Thread Pavel Stehule
2009/9/10 Tom Lane : > Scott Bailey writes: >> Specifically, I'm trying to make a function like Oracle's dump that will >> take anything as input and return the internal representation of it. So >> I want to determine what type was passed in and call the appropriate >> send function. > > You would

Re: [GENERAL] Getting the oid of an anyelement

2009-09-10 Thread Scott Bailey
please, try to look on function pg_typeof Thanks Pavel. Just what I needed. But you're too late on the orafce recommendation. I had already written it by the time you posted. I would have written it any way though because Tom said I couldn't :) You would need to write that in C. Two probl

Re: [GENERAL] Getting the oid of an anyelement

2009-09-10 Thread Pavel Stehule
2009/9/10 Scott Bailey : >> please, try to look on function pg_typeof > > Thanks Pavel. Just what I needed. But you're too late on the orafce > recommendation. I had already written it by the time you posted. I would > have written it any way though because Tom said I couldn't :) > >> You would nee

Re: [GENERAL] Unable to drop a table due to seemingly non-existent dependencies

2009-09-10 Thread David Brain
Hi, On Thu, Sep 10, 2009 at 2:55 PM, Tom Lane wrote: > > The "ownership" link is still there, evidently, and should be switched > to the new table.  Read up on ALTER SEQUENCE OWNED BY. > >                        regards, tom lane > Thank you - that was the issue, once the ownership was switched

Re: [GENERAL] "show all" command crashes server

2009-09-10 Thread Grant Maxwell
On 11/09/2009, at 1:09 AM, Richard Huxton wrote: On this one server if I use the command "show all" in psql, phpPgAdmin or pgAdmin3 the postgresql server spits the dummy as follows: postgres=# show all; server closed the connection unexpectedly Hmm - some modules can provide their ow

Re: [GENERAL] "show all" command crashes server

2009-09-10 Thread Tom Lane
Grant Maxwell writes: > On 11/09/2009, at 1:09 AM, Richard Huxton wrote: >> Hmm - some modules can provide their own config variables. Do you have >> the same modules installed in all three servers? > How can I determine what modules are installed ? The contents of the local_preloa

Re: [GENERAL] COPY command character set

2009-09-10 Thread Alvaro Herrera
Peter Headland wrote: > As a general comment, I18N/L10N is a hairy enough topic that it merits > its own heading in any commands where it is an issue. I agree, this seems a good idea because people is often confused by this. -- Alvaro Herrerahttp://www.CommandPro

Re: [GENERAL] "show all" command crashes server

2009-09-10 Thread Grant Maxwell
On 11/09/2009, at 8:17 AM, Tom Lane wrote: Grant Maxwell writes: On 11/09/2009, at 1:09 AM, Richard Huxton wrote: Hmm - some modules can provide their own config variables. Do you have the same modules installed in all three servers? How can I determine what modules are

Re: [GENERAL] "show all" command crashes server

2009-09-10 Thread Tom Lane
Grant Maxwell writes: > On the problem server: > shared_preload_libraries = 'pgmemcache' > #local_preload_libraries = '' > on the others both are emply. Sounds like a smoking gun to me. > For good measure I removed pgmemcache but the problem persists. Did you restart the postmaster

Re: [GENERAL] "show all" command crashes server

2009-09-10 Thread Grant Maxwell
On 11/09/2009, at 8:36 AM, Tom Lane wrote: Grant Maxwell writes: On the problem server: shared_preload_libraries = 'pgmemcache' #local_preload_libraries = '' on the others both are emply. Sounds like a smoking gun to me. For good measure I removed pgmemcache but the pro

Re: [GENERAL] "show all" command crashes server

2009-09-10 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 >> shared_preload_libraries = 'pgmemcache' ... > Sounds like a smoking gun to me. Yep, known problem with pgmemcache. Bruce and I poked around with this about a year ago. Bruce, I think you were going to throw the problem at some EDB people - di

[GENERAL] Open source database design tool , alternative to MicroOLDAP

2009-09-10 Thread NTPT
Hi all. is there available some freeware and/or opensource visual database design tool for postgresql ? Something like commercial microOLAP ? thanx for help -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mail

Re: [GENERAL] Open source database design tool , alternative to MicroOLDAP

2009-09-10 Thread Peter Hunsberger
Check out Power Architect. Pre-major release, it has some bugs, but generally works well. It can also forward and reverse engineer. 2009/9/10 NTPT : > Hi all. is there available some freeware and/or opensource visual database > design tool for postgresql ? Something like commercial microOLAP ? >

[GENERAL] quick survey on schema less database usage

2009-09-10 Thread rr04
I am an MIT student doing a project on schema-less database usage and would greatly appreciate if you guys can fill out a quick survey on this (should take < 5 mins) http://bit.ly/nosqldb -- View this message in context: http://www.nabble.com/quick-survey-on-schema-less-database-usage-tp2539433

[GENERAL] Getting Out Parameter in the application using libpq

2009-09-10 Thread Ehsan Haq
Hi,    I am looking for a way to get the OUT parameters of a FUNCTION/PROCEDURE in my application (C++) using C libpq library. I can get the result set of an OUT parameter having REFCURSOR data type through an explicit FETCH ALL from "" but for OUT parameter of type integer/varchar I dont ha

Re: [GENERAL] "show all" command crashes server

2009-09-10 Thread Tom Lane
Grant Maxwell writes: > On 11/09/2009, at 8:36 AM, Tom Lane wrote: >> Did you restart the postmaster afterwards? > yep - full restart. okay, next step is to collect a stack trace ... regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgres

[GENERAL] Installing postgresql on Debian Lenny-->my /etc/apt/sources.list.

2009-09-10 Thread Ricky Tompu Breaky
Dear my friends, I want to install PostgreSQL in my Debian Lenny box. I can't install PostgreSQL with aptitude: " aptitude install postgresql ". It seems that the aptitude can not find the postgresql. This is my '/etc/apt/sources.list'. I have done "aptitude update" too. And it was completed p

Re: [GENERAL] Installing postgresql on Debian Lenny-->my /etc/apt/sources.list.

2009-09-10 Thread Peter Eisentraut
On Fri, 2009-09-11 at 13:17 +0700, Ricky Tompu Breaky wrote: > It seems that the aptitude can not find the postgresql. Please post the exact output from the screen. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql