Re: [GENERAL] berkley sockets

2006-09-12 Thread J S B
I don't want to connect to the postgres database.   The scenario is something like this.   Postgres database has to initiate some deamon process running is another server. The only way i could think of doing this was openeing a socket connection between postgres database and the deamon process thr

Re: [GENERAL] Initializing Datums for use with SPI_execute_plan

2006-09-12 Thread Martijn van Oosterhout
On Tue, Sep 12, 2006 at 09:57:33PM -0400, Jack Orenstein wrote: > I'm stuck on how to bind the values. The problem is that the values > being bound are not present as Datums. I don't get them as function > parameters, or from a table. I have data encoded, in a proprietary > format in one bytea colu

Re: [GENERAL] berkley sockets

2006-09-12 Thread Martijn van Oosterhout
On Tue, Sep 12, 2006 at 07:52:08PM -0400, J S B wrote: > Hi, > Just wondering if anyone has used Berkley sockets ever. > I'm aiming at establishing a socket connection between my Postgres database > server (using the shared objects that i dynamically load) > and a Unix server. > What would be the b

Re: [GENERAL] off topic - web shop

2006-09-12 Thread Sim Zacks
I used Interchange to build a chinese auction website about 5-6 years ago and it worked great. A minor amount of scripting was needed for custom functions, but other then that it worked "out of the box" Sergiusz Jarczyk wrote: Hi Benjamin Smith wrote: [...] I'd guess you're looking for OSComm

Re: [GENERAL] Superuser lost access to particular database

2006-09-12 Thread Tom Lane
Francisco Reyes <[EMAIL PROTECTED]> writes: > Tom Lane writes: >> SELECT classid, objid, refclassid, refobjid, deptype FROM pg_depend WHERE >> deptype != 'p' ORDER BY 1,2 >> so apparently something is fishy about the dependency data. Can you >> execute this query by hand and get results? > Nothi

Re: [GENERAL] Superuser lost access to particular database

2006-09-12 Thread Francisco Reyes
Tom Lane writes: Francisco Reyes <[EMAIL PROTECTED]> writes: Tom Lane writes: is the pg_dump or its backend consuming CPU, or just sitting? At 90% of my CPU. The pg_dump process, or the backend? Backend. pgsql 60769 47.8 1.3 17636 4888 ?? R 11:34AM 761:15.92 postmaster: pgsql pabl

[GENERAL] Initializing Datums for use with SPI_execute_plan

2006-09-12 Thread Jack Orenstein
I am trying to write a postgresql extension in C, which uses SPI_prepare and SPI_execute_plan. What I want to do is to create a prepared INSERT statement, bind some int, bigint, varchar and bytea values, and then execute the INSERT. I'm stuck on how to bind the values. The problem is that the val

[GENERAL] berkley sockets

2006-09-12 Thread J S B
Hi, Just wondering if anyone has used Berkley sockets ever. I'm aiming at establishing a socket connection between my Postgres database server (using the shared objects that i dynamically load) and a Unix server. What would be the best thing to use for such a thing in Postgres scenario?   Thanks,  

Re: [GENERAL] program for graphical/schematical representation of relations between tables

2006-09-12 Thread Brandon Aiken
MS Paint.  ;)   Literally, there were posts about this yesterday.  Look for DBDesigner4 and Clay (an Eclipse extention/plug-in).   -- Brandon Aiken CS/IT Systems Engineer From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Zlatko Matic Sent: Tuesda

[GENERAL] program for graphical/schematical representation of relations between tables

2006-09-12 Thread Zlatko Matić
Is there any free program that can graphically/schematically display relations between all tables in a database? Regards,   Zlatko

Re: [GENERAL] serial, sequence, and COPY FROM

2006-09-12 Thread Michael Fuhr
On Tue, Sep 12, 2006 at 02:48:30PM -0400, Brandon Aiken wrote: > Serial fields have a default value of nextval, so if you add an 18th > field to your text file with DEFAULT in every record it should work as > intended. DEFAULT works with INSERT but not with COPY: test=> CREATE TABLE foo (col1 int

Re: [GENERAL] serial, sequence, and COPY FROM

2006-09-12 Thread Scott Marlowe
On Tue, 2006-09-12 at 13:48, Brandon Aiken wrote: > Serial fields have a default value of nextval, so if you add an 18th > field to your text file with DEFAULT in every record it should work as > intended. Or you can use the copy table (field1,field2,field3,...field18) from stdin; syntax, and l

Re: [GENERAL] serial, sequence, and COPY FROM

2006-09-12 Thread Alvaro Herrera
[EMAIL PROTECTED] wrote: > All, > > I have a pipe delimited text file I'm trying to copy to a table. The > file has 17 fields per line. The table has 18, with that last field > (record) a serial with sequence. I have done: > select setval('sequence_name_seq', 555, 'TRUE') > but when I do: COPY tab

Re: [GENERAL] serial, sequence, and COPY FROM

2006-09-12 Thread Michael Fuhr
On Tue, Sep 12, 2006 at 09:27:55AM -0700, [EMAIL PROTECTED] wrote: > I have a pipe delimited text file I'm trying to copy to a table. The > file has 17 fields per line. The table has 18, with that last field > (record) a serial with sequence. I have done: > select setval('sequence_name_seq', 555, '

Re: [GENERAL] serial, sequence, and COPY FROM

2006-09-12 Thread Brandon Aiken
Serial fields have a default value of nextval, so if you add an 18th field to your text file with DEFAULT in every record it should work as intended. -- Brandon Aiken CS/IT Systems Engineer -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]

Re: [GENERAL] Bytea to Text problems

2006-09-12 Thread John McCawley
Yeah, apparently it's OK when spewed out to the browser...Didn't think of that :P Martijn van Oosterhout wrote: On Tue, Sep 12, 2006 at 10:56:09AM -0500, John McCawley wrote: I've searched high and low, and all I've found is people being chided for trying to convert from Bytea to text :)

[GENERAL] serial, sequence, and COPY FROM

2006-09-12 Thread rloefgren
All, I have a pipe delimited text file I'm trying to copy to a table. The file has 17 fields per line. The table has 18, with that last field (record) a serial with sequence. I have done: select setval('sequence_name_seq', 555, 'TRUE') but when I do: COPY tablename FROM '/path/to/file/file.txt' de

Re: [GENERAL] Superuser lost access to particular database

2006-09-12 Thread Tom Lane
Francisco Reyes <[EMAIL PROTECTED]> writes: > Tom Lane writes: >> is the pg_dump or its backend consuming CPU, or just sitting? > At 90% of my CPU. The pg_dump process, or the backend? > I have loggin set log_min_messages = info and log_statement = 'all'. > Right after I start the pg_dump there

Re: [GENERAL] Stored Procedure performance / elegance question

2006-09-12 Thread Tony Caduto
Karen Hill wrote: x-no-archive:yes Hello. I have a stored procedure which returns a setof record. The function takes a few arguments, and if a couple of specific input values are null, it is required that the stored procedure perform different actions. I know that the planner does not store t

Re: [GENERAL] Bytea to Text problems

2006-09-12 Thread Martijn van Oosterhout
On Tue, Sep 12, 2006 at 10:56:09AM -0500, John McCawley wrote: > I've searched high and low, and all I've found is people being chided > for trying to convert from Bytea to text :) > > When I first designed my database, I simply didn't understand the > purpose of bytea, I didn't actually realize

[GENERAL] Bytea to Text problems

2006-09-12 Thread John McCawley
I've searched high and low, and all I've found is people being chided for trying to convert from Bytea to text :) When I first designed my database, I simply didn't understand the purpose of bytea, I didn't actually realize that there *was* a text data type. (Actually, I was porting from a MS

Re: [GENERAL] Superuser lost access to particular database

2006-09-12 Thread Francisco Reyes
Tom Lane writes: Define "freezes". What happens exactly doing pg_dump |tee Shows nothing. This database is not very big so I would expect it to be done quickly. I tried a couple of other databases and they did the pg_dump without problems. is the pg_dump or its backend consuming CPU,

Re: [GENERAL] Child program using parent program's transaction?

2006-09-12 Thread Andrew Sullivan
On Wed, Sep 06, 2006 at 03:21:04PM -0700, Wayne Conrad wrote: > Today, it would once again be convenient to have an exec'd program do > its work in the context of its parent program's transaction. So, > before I once again decide that I don't actually want to do that, can > you tell me... is it po

Re: [GENERAL] initdb: invalid locale name "sv_SE.ISO-8859-1"

2006-09-12 Thread Martijn van Oosterhout
On Tue, Sep 12, 2006 at 10:05:33AM -0400, Tom Lane wrote: > > Check whether this locale exists in /etc/locale.gen. If the name > > doesn't exactly match, postgresql will complain that it doesn't know > > it. > > I think the more portable way to discover what locale names the OS > knows is "locale

Re: [GENERAL] initdb: invalid locale name "sv_SE.ISO-8859-1"

2006-09-12 Thread Tom Lane
Martijn van Oosterhout writes: > On Tue, Sep 12, 2006 at 09:43:31AM +0200, Ragnar =D6sterlund wrote: >> I get the error: >> initdb: invalid locale name "sv_SE.ISO-8859-1" > Check whether this locale exists in /etc/locale.gen. If the name > doesn't exactly match, postgresql will complain that it d

Re: [GENERAL] initdb: invalid locale name "sv_SE.ISO-8859-1"

2006-09-12 Thread Ivan Sergio Borgonovo
On Tue, 12 Sep 2006 13:20:47 + Ragnar <[EMAIL PROTECTED]> wrote: > > This is on Ubuntu that it fails. It works fine on my slackware > > installation. I tried compile postgresql from source on ubuntu, > > I think that nowadays Ubuntu does only create UFT-8 > locales. > try man locale-gen I'v

Re: [GENERAL] off topic - web shop

2006-09-12 Thread Sergiusz Jarczyk
Hi Benjamin Smith wrote: [...] I'd guess you're looking for OSCommerce. (Sucks, but less so than most other free alternatives) [...] You can also check Interchange (www.icdevgroup.org). Although it's a way more complicated than OSCommerce (in fact, IC is more an application server than sim

Re: [GENERAL] Superuser lost access to particular database

2006-09-12 Thread Tom Lane
Francisco Reyes <[EMAIL PROTECTED]> writes: > Trying to pg_dump as superuser or as the database owner, freezes. Define "freezes". What happens exactly --- is the pg_dump or its backend consuming CPU, or just sitting? What do ps and pg_stat_activity and pg_locks show that it's doing? (I'm specu

Re: [GENERAL] Issue with order by for type varchar

2006-09-12 Thread Martijn van Oosterhout
On Tue, Sep 12, 2006 at 09:51:20AM +1200, [EMAIL PROTECTED] wrote: > Hi All, > > I am trying to order a select by the primary key which is a varchar field. > > 1. the varchar always contains 28 characters. ( and, yes, I know the irony > of using a variable array on a known fixed length field )

Re: [GENERAL] ECPG and COPY

2006-09-12 Thread Florian Weimer
* Bruce Momjian: >> > Could you please explain what this has to do with my original question? >> >> I assumed that ECPG did something special with TO STDOUT, like other >> interfaces do. This is not the case (that is, STDOUT is really >> standard output, so the functionality is not very useful.

Re: [GENERAL] initdb: invalid locale name "sv_SE.ISO-8859-1"

2006-09-12 Thread Ragnar
On þri, 2006-09-12 at 09:43 +0200, Ragnar Österlund wrote: > When I try to initialize a new cluster like this: > > /usr/lib/postgresql/8.1/bin/initdb --locale=sv_SE.ISO-8859-1 -D sv_SE_data/ > > I get the error: > > initdb: invalid locale name "sv_SE.ISO-8859-1" > > This is on Ubuntu that it f

Re: [GENERAL] Superuser lost access to particular database

2006-09-12 Thread Simon_Kelly
This may sound a bit weird, but have you tried logging in as user1 and then granting the permission's to the superuser? Simon Kelly Java Developer Information Systems Development Information Technology Shared Services Ministry of Health DDI: Mobile: http://www.moh.govt.nz mailto:[EMAIL PROTEC

Re: [GENERAL] off topic - web shop

2006-09-12 Thread Benjamin Smith
On Monday 11 September 2006 11:30, stig erikson wrote: > Hi. > We are looking to open a small web shop. I looked around to see if there are any open source web shops. > Can anyone recommend any web shop system (free or non-free)? I'd guess you're looking for OSCommerce. (Sucks, but less so than

[GENERAL] Issue with order by for type varchar

2006-09-12 Thread Simon_Kelly
Hi All, I am trying to order a select by the primary key which is a varchar field. I have two known conditions, 1. the varchar always contains 28 characters. ( and, yes, I know the irony of using a variable array on a known fixed length field ) 2. the content of this field contains only the c

Re: [GENERAL] [pgsql-advocacy] Thought provoking piece on

2006-09-12 Thread Tomi NA
On 9/1/06, Peter Eisentraut <[EMAIL PROTECTED]> wrote: Martijn van Oosterhout wrote: > Do we want to keep relying on the system libraries for collation, or > do we want to use a cross-platform library like ICU or do we want to > create our own collation library? ICU seems fine. +1 t.n.a. ---

[GENERAL] Multiple entries of same table in pg_class

2006-09-12 Thread Peter Bauer
Hi all, after extensive logfilechecking we found out that there are 70 entries for the same table in pg_class which are identical. Dropping the table results in a "missing attribute ..." error for this relation. PostgreSQL 7.4.7 Debian Sarge regards, Peter ---(end of br

Re: [GENERAL] [ANNOUNCE] == PostgreSQL Weekly News - September 10 2006 ==

2006-09-12 Thread Tomi NA
On 9/11/06, Tatsuo Ishii <[EMAIL PROTECTED]> wrote: > == PostgreSQL Product News == > > pgpool-II-1.0.0 is out, now supporting more than two servers and with > the new pgpoolAdmin tool written in PHP. > http://pgfoundry.org/projects/pgpool/ You dropped the most important feature in pgpool-II: pa

Re: [GENERAL] find a free database design software

2006-09-12 Thread Tomi NA
On 9/9/06, aBBISh <[EMAIL PROTECTED]> wrote: hello everyone: i want find a free software for design postgresql database model please commend one ~ thanks If you mean free as in beer, azzuri is what I use from time to time: http://www.azzurri.jp/en/software/clay/download.jsp If you mean free

Re: [GENERAL] [ADMIN] Problem with lo_export() and lo_import() from remote machine.

2006-09-12 Thread Purusothaman A
Thank you Marco Bizzarri.My solution would be C API.Thanks for you prompt response.:)Purusothaman AOn 9/11/06, Marco Bizzarri <[EMAIL PROTECTED]> wrote: On 9/11/06, Purusothaman A <[EMAIL PROTECTED]> wrote:> Hi Marco Bizzarri and Martijn van Oosterhout,>>> Thanks for your valuable reply. >> I am t

Re: [GENERAL] initdb: invalid locale name "sv_SE.ISO-8859-1"

2006-09-12 Thread Martijn van Oosterhout
On Tue, Sep 12, 2006 at 09:43:31AM +0200, Ragnar Österlund wrote: > Hi, > > When I try to initialize a new cluster like this: > > /usr/lib/postgresql/8.1/bin/initdb --locale=sv_SE.ISO-8859-1 -D sv_SE_data/ > > I get the error: > > initdb: invalid locale name "sv_SE.ISO-8859-1" Check whether th

[GENERAL] initdb: invalid locale name "sv_SE.ISO-8859-1"

2006-09-12 Thread Ragnar Österlund
Hi, When I try to initialize a new cluster like this: /usr/lib/postgresql/8.1/bin/initdb --locale=sv_SE.ISO-8859-1 -D sv_SE_data/ I get the error: initdb: invalid locale name "sv_SE.ISO-8859-1" This is on Ubuntu that it fails. It works fine on my slackware installation. I tried compile postgr