[GENERAL] Getting this error

2012-06-12 Thread yatler sahri
Hi  I'm running on a program as to migrate multiple tables to one table the program seems worked on informix environment but not in postgress Im getting the following error when running the program on postgress  | pgs.c:01466(3)  : Nat stmt1 = declare cu4 cursor for   | pgs.c:01472(2)  : Could

Re: [GENERAL] Question about load balance

2012-06-12 Thread Condor
On 2012-06-12 10:48, John R Pierce wrote: On 06/11/12 11:29 PM, Condor wrote: I think I'm trying to learn information what is the technique for managing large databases not to philosophize what was my server. you handle large databases with a lot of fast disk, and memory, this gets you into t

Re: [GENERAL] Problem installing extensions on Lion

2012-06-12 Thread Stefan Schwarzer
>> I upgraded my machine from Snow Leopard to Lion, and ran, as usual, into >> some Postgres update problems. >> >> I used Kyngchaos libraries for all frameworks and Postgres. Now, I'd like to >> install the tablefunc/crosstab function. >> >> But the "make" process gives me this: > > Looks lik

[GENERAL] Create view is not accepting the parameter in postgres functions

2012-06-12 Thread Divyaprakash Y
Hi, Is the following postgres function correct? CREATE OR REPLACE FUNCTION "MyFun"("IdArgs" INTEGER) RETURNS SETOF "B" AS $BODY$ CREATE VIEW "A" AS SELECT * FROM "B" WHERE "Id" = $1; SELECT * FROM "B"; $BODY$ LANGUAGE 'sql' VOLATILE

Re: [GENERAL] How to create c language in postgresql database. Thanks.

2012-06-12 Thread Chris Travers
On Tue, Jun 12, 2012 at 11:47 AM, John R Pierce wrote: > On 06/12/12 11:25 AM, leaf_yxj wrote: >> >> Thanks. You guys are right. I check the database. The C programm is there. >>   - but why our application team keep ask me to give them the superuser >> privileges to create the C function. Sho

Re: [GENERAL] How to create c language in postgresql database. Thanks.

2012-06-12 Thread Craig Ringer
On 06/13/2012 03:35 AM, leaf_yxj wrote: Hi John, Thanks for your useful info. I really apprecaite it. I got this problem when the SAS application try to install the scoring model. So I am very confused. > 1) What's the info in .dll/.so ? thats the binary code compiled and linked from C, w

Re: [GENERAL] UPDATE Syntax Check

2012-06-12 Thread Rich Shepard
On Tue, 12 Jun 2012, David Johnston wrote: And, to be thorough, you need to put commas between each field you want to update. Did that. Didn't write it that way in the message. Regards, Rich -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your sub

Re: [GENERAL] Function already exists with same argument types

2012-06-12 Thread Craig Ringer
On 06/12/2012 09:01 PM, gipsy-king1 wrote: Dear all I want to import a postGIS-DB backup-file. When I execute this command: *pg_restore -i -h localhost -p 5432 -U postgres -d THS -v "/alkis.backup" > "\output.txt" 2>&1* I get an textfile with all outputs. There are lots of ERRORs like this:

Re: [GENERAL] Problem installing extensions on Lion

2012-06-12 Thread Craig Ringer
On 06/12/2012 08:21 PM, Stefan Schwarzer wrote: Hi there, I upgraded my machine from Snow Leopard to Lion, and ran, as usual, into some Postgres update problems. I used Kyngchaos libraries for all frameworks and Postgres. Now, I'd like to install the tablefunc/crosstab function. But the "m

Re: [GENERAL] UPDATE Syntax Check

2012-06-12 Thread David Johnston
On Jun 12, 2012, at 18:50, Rich Shepard wrote: > On Wed, 13 Jun 2012, Thomas Kellerer wrote: > >> UPDATE waterchem >> SET waterchem.easting = s.easting >> waterchem.northing = s.northing >> FROM sites AS s >> WHERE waterchem.site = s.name; > > Thomas, > > For the record, running this push

Re: [GENERAL] trigger on view returning created serial

2012-06-12 Thread Jeff Davis
On Tue, 2012-06-12 at 22:35 +0200, Philipp Kraus wrote: > Hello, > > I have created a view and on this view a trigger, which is called on an > insert command on the view. > Within the trigger I run an insert on a table and one of the table fields > uses a serial sequence, that > creates values.

Re: [GENERAL] Reference with inheritance propagate data

2012-06-12 Thread Jeff Davis
On Wed, 2012-06-13 at 00:38 +0400, Yuriy Rusinov wrote: > Hello, All ! > > I have base table q_base_table with column (id bigint) which may be > inherited by users tables, primary key for both base table and derived > tables is id. Now I need for another table record_rubricator which has > to be r

Re: [GENERAL] UPDATE Syntax Check

2012-06-12 Thread Rich Shepard
On Wed, 13 Jun 2012, Thomas Kellerer wrote: UPDATE waterchem SET waterchem.easting = s.easting waterchem.northing = s.northing FROM sites AS s WHERE waterchem.site = s.name; Thomas, For the record, running this pushed me to the correct syntax: UPDATE waterchem SET easting = s.e

Re: [GENERAL] UPDATE Syntax Check

2012-06-12 Thread Rich Shepard
On Wed, 13 Jun 2012, Thomas Kellerer wrote: No it's not quite correct: UPDATE waterchem SET waterchem.easting = s.easting waterchem.northing = s.northing FROM sites AS s WHERE waterchem.site = s.name; Thomas, I wondered about this syntax, and doing each column separately. Thanks for

Re: [GENERAL] UPDATE Syntax Check

2012-06-12 Thread Thomas Kellerer
Rich Shepard wrote on 13.06.2012 00:17: One table, waterchem, with primary key 'site' has columns easting and northing with no values in them. A second table, sites, with primary key 'name' has values for easting and northing for each row. I want to update waterchem with the easting and northi

[GENERAL] UPDATE Syntax Check

2012-06-12 Thread Rich Shepard
One table, waterchem, with primary key 'site' has columns easting and northing with no values in them. A second table, sites, with primary key 'name' has values for easting and northing for each row. I want to update waterchem with the easting and northing values from sites. My proposed statemen

[GENERAL] Reference with inheritance propagate data

2012-06-12 Thread Yuriy Rusinov
Hello, All ! I have base table q_base_table with column (id bigint) which may be inherited by users tables, primary key for both base table and derived tables is id. Now I need for another table record_rubricator which has to be referenced to base and derived tables, which way I have to do it, bec

[GENERAL] trigger on view returning created serial

2012-06-12 Thread Philipp Kraus
Hello, I have created a view and on this view a trigger, which is called on an insert command on the view. Within the trigger I run an insert on a table and one of the table fields uses a serial sequence, that creates values. If I run in the trigger after the insert a "return NEW", the field (i

Re: [GENERAL] How to create c language in postgresql database. Thanks.

2012-06-12 Thread leaf_yxj
Hi John, Thanks for your useful info. I really apprecaite it. I got this problem when the SAS application try to install the scoring model. So I am very confused. > 1) What's the info in .dll/.so ? thats the binary code compiled and linked from C, windows calls this DLL (Dynamic Link Librar

Re: [GENERAL] How to create c language in postgresql database. Thanks.

2012-06-12 Thread John R Pierce
On 06/12/12 12:22 PM, leaf_yxj wrote: 1) What's the info in .dll/.so ? thats the binary code compiled and linked from C, windows calls this DLL (Dynamic Link Library), while unix usually calls it SO (Shared Object). Mac OSX has yet another name (dylib or something). 2) .sql scrap is t

Re: [GENERAL] How to create c language in postgresql database. Thanks.

2012-06-12 Thread leaf_yxj
Hi John, Thanks for your quick reply. It's really help me a lot. 1) What's the info in .dll/.so ? 2) .sql scrap is the binary installation file? 3) For the same database, we need update C functions frequently ? Thanks. Regards. Grace At 2012-06-13 03:08:26,"John R Pierce [via Post

Re: [GENERAL] How to create c language in postgresql database. Thanks.

2012-06-12 Thread John R Pierce
On 06/12/12 12:07 PM, leaf_yxj wrote: one more question: so it's one time jobs or it need keep doing. each time the C function is updated, you would need to DROP FUNCTION / replace binary / CREATE FUNCTION in any database that needs it. and each time you create a new database that needs it,

Re: [GENERAL] How to create c language in postgresql database. Thanks.

2012-06-12 Thread leaf_yxj
Hi John, one more question: so it's one time jobs or it need keep doing. Thanks. Grace At 2012-06-13 02:48:20,"John R Pierce [via PostgreSQL]" wrote: On 06/12/12 11:25 AM, leaf_yxj wrote: > Thanks. You guys are right. I check the database. The C programm is > there. - but why our

Re: [GENERAL] How to create c language in postgresql database. Thanks.

2012-06-12 Thread John R Pierce
On 06/12/12 12:04 PM, leaf_yxj wrote: So can I ( the superuser) do it by myself and how can I do it? the devs would give you the .dll/.so file, and a .sql scrap to do the install. you'd put the .so/.dll in an appropriate place, and run the .sql scrap to install it into a given database.

Re: [GENERAL] How to create c language in postgresql database. Thanks.

2012-06-12 Thread leaf_yxj
John, So can I ( the superuser) do it by myself and how can I do it? Thanks. Grace At 2012-06-13 02:48:20,"John R Pierce [via PostgreSQL]" wrote: On 06/12/12 11:25 AM, leaf_yxj wrote: > Thanks. You guys are right. I check the database. The C programm is > there. - but why our appl

Re: [GENERAL] How to create c language in postgresql database. Thanks.

2012-06-12 Thread John R Pierce
On 06/12/12 11:25 AM, leaf_yxj wrote: Thanks. You guys are right. I check the database. The C programm is there. - but why our application team keep ask me to give them the superuser privileges to create the C function. Should they use the superuser to create the C function. if yes , why

Re: [GENERAL] How to create c language in postgresql database. Thanks.

2012-06-12 Thread leaf_yxj
Hi Tom, Thanks. You guys are right. I check the database. The C programm is there. - but why our application team keep ask me to give them the superuser privileges to create the C function. Should they use the superuser to create the C function. if yes , why they need it? Thanks. Regards.

Re: [GENERAL] How to create c language in postgresql database. Thanks.

2012-06-12 Thread leaf_yxj
Hi John, Thanks. You guys are right. I check the database. The C programm is there. - but why our application team keep ask me to give them the superuser privileges to create the C function. Should they use the superuser to create the C function. if yes , why they need it? Thanks. Reg

Re: [GENERAL] How to create c language in postgresql database. Thanks.

2012-06-12 Thread leaf_yxj
Hi Raymond, Thanks. You guys are right. I check the database. The C programm is there. - but why our application team keep ask me to give them the superuser privileges to create the C function. Should they use the superuser to create the C function. if yes , why they need it? Thanks.

Re: [GENERAL] How to create c language in postgresql database. Thanks.

2012-06-12 Thread yxj
Hi Tom, Thanks. You guys are right. I check the database. The C programm is there. - but why our application team keep ask me to give them the superuser privileges to create the C function. Should they use the superuser to create the C function. if yes , why they need it? Thanks. Regar

Re: [GENERAL] How to create c language in postgresql database. Thanks.

2012-06-12 Thread John R Pierce
On 06/12/12 9:53 AM, leaf_yxj wrote: I need to create c language in the postgresql database. I only know to create as follows. Create language c ; to clarify what tom said, you externally compile your C functions into .so/.dll files, then bind them in with CREATE FUNCTION name(args) RETU

Re: [GENERAL] How to declare return type for a function returning several rows and columns?

2012-06-12 Thread Dmitriy Igrishin
Hey Alexander, 2012/6/12 Alexander Farber > Hello, > > I'm trying to create the following function which gives me > a runtime error, because it obviously doesn't return a mere > integer but several rows and columns (result of a join): > > # create or replace function pref_daily_misere() returns

Re: [GENERAL] How to create c language in postgresql database. Thanks.

2012-06-12 Thread Tom Lane
leaf_yxj writes: > I need to create c language in the postgresql database. Why do you think you need to do that? It's built-in. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.pos

[GENERAL] How to declare return type for a function returning several rows and columns?

2012-06-12 Thread Alexander Farber
Hello, I'm trying to create the following function which gives me a runtime error, because it obviously doesn't return a mere integer but several rows and columns (result of a join): # create or replace function pref_daily_misere() returns setof integer as $BODY$ begin create

Re: [GENERAL] How to create c language in postgresql database. Thanks.

2012-06-12 Thread Raymond O'Donnell
On 12/06/2012 17:53, leaf_yxj wrote: > I need to create c language in the postgresql database. I only know > to create as follows. > > Create language c ; > > > Is there anything else I need to do before I create the C language? Hello Grace, C isn't available (AFAIK) as a procedural language;

[GENERAL] Recovery continually requests new WAL files

2012-06-12 Thread Alex Good
Hey! I have a simple setup with one master and one backup server. I have an issue where I have performed a backup and copied it to the data directory for the slave, written a recovery.conf and copied in the backup_label file and then started the server, it happily restores everything up until

[GENERAL] How to create c language in postgresql database. Thanks.

2012-06-12 Thread leaf_yxj
I need to create c language in the postgresql database. I only know to create as follows. Create language c ; Is there anything else I need to do before I create the C language? Thanks. Regards. Grace -- View this message in context: http://postgresql.1045698.n5.nabble.com/How-to-create-c

[GENERAL] Function already exists with same argument types

2012-06-12 Thread gipsy-king1
Dear all I want to import a postGIS-DB backup-file. When I execute this command: *pg_restore -i -h localhost -p 5432 -U postgres -d THS -v "/alkis.backup" > "\output.txt" 2>&1* I get an textfile with all outputs. There are lots of ERRORs like this: *pg_restore: erstelle FUNCTION st_geometry_an

Re: [GENERAL] import *.backup-file (PostGIS - not mine)

2012-06-12 Thread Tom Lane
gipsy-king1 writes: > There are few errors after my pg_restore command. > pg_restore -i -h localhost -p 5432 -U postgres -d THS -v > "H:.../netzknotenmodell_etrs89.backup" > could not execute query: ERROR: type "public.geometry" is only a shell Are these partial dumps? It appears that you don't

Re: [GENERAL] import *.backup-file (PostGIS - not mine)

2012-06-12 Thread gipsy-king1
There are few errors after my pg_restore command. pg_restore -i -h localhost -p 5432 -U postgres -d THS -v "H:.../netzknotenmodell_etrs89.backup" could not execute query: ERROR: type "public.geometry" is only a shell could not execute query: ERROR: relation "strasse.netzknotenmodell_etrs89" does

[GENERAL] Problem installing extensions on Lion

2012-06-12 Thread Stefan Schwarzer
Hi there, I upgraded my machine from Snow Leopard to Lion, and ran, as usual, into some Postgres update problems. I used Kyngchaos libraries for all frameworks and Postgres. Now, I'd like to install the tablefunc/crosstab function. But the "make" process gives me this: cd contrib/tablefunc ta

Re: [GENERAL] Question about load balance

2012-06-12 Thread John R Pierce
On 06/11/12 11:29 PM, Condor wrote: I think I'm trying to learn information what is the technique for managing large databases not to philosophize what was my server. you handle large databases with a lot of fast disk, and memory, this gets you into the terabytes. clustering/load balancing

Re: [GENERAL] Segmentation Fault

2012-06-12 Thread Craig Ringer
On 06/12/2012 03:15 AM, Benson Jin wrote: Hi All, A silly question how do I get install external symbols for postgresql, if compiled it myself previously? Do I recompile it with --enable-debug option? If you didn't strip the executable then the cores produced even without --enable-debug

Re: [GENERAL] Postgres 9.2 beta2 one-click installer on windows

2012-06-12 Thread Sachin Srivastava
[CCed the list] On Tue, Jun 12, 2012 at 12:33 PM, Sachin Srivastava < sachin.srivast...@enterprisedb.com> wrote: > > On Tue, Jun 12, 2012 at 12:31 PM, Craig Ringer wrote: > >> On 06/11/2012 08:36 PM, Marc Watson wrote: >> >>> >>> *De :*Craig Ringer [mailto:ring...@ringerc.id.au] >>> >>> >>> >>> I