[BUGS] problem with TRUNCATE TABLE in plpgsql function
Hi all I played with some own old plpgsql functions. I found "error" in plpgsql 7.3. When I use TRUNCATE TABLE in function I get TRUNCATE TABLE cannot be executed from a function. In 7.2.2. I can use this command. Why, now I can't use truncate table? Thank you Pavel Stehule ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
Re: [BUGS] problem with TRUNCATE TABLE in plpgsql function
Pavel Stehule <[EMAIL PROTECTED]> writes: > I played with some own old plpgsql functions. I found "error" in plpgsql > 7.3. When I use TRUNCATE TABLE in function I get > TRUNCATE TABLE cannot be executed from a function. > In 7.2.2. I can use this command. Why, now I can't use truncate table? This is a deliberate change for safety reasons: if your function errors out after performing TRUNCATE, you are in big trouble. If TRUNCATE is ever rewritten to be rollback-safe, we will remove the restriction. regards, tom lane ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
Re: [BUGS] hi-problem while installing postgressql 7.2 version
HI thanx, it's true. now this step is clear, but again in the next step postmaster it's giving problem. when i give pg_ctl -D ..., its giving the listed below prblem. can u help me please. thanx in advance once again. santosh kumar singh@SANTOSH /cygdrive/c/cygwin/usr/local/pgsql/bin $ ./pg_ctl -D /usr/local/pgsql/data/data -l logfile start postmaster successfully started santosh kumar singh@SANTOSH /cygdrive/c/cygwin/usr/local/pgsql/bin $ C:\cygwin\usr\local\pgsql\bin\postgres.exe: *** recreate_mmaps_after _fork_failed C:\cygwin\usr\local\pgsql\bin\postgres.exe: *** recreate_mmaps_after_f ork_failed C:\cygwin\usr\local\pgsql\bin\postgres.exe: *** recreate_mmaps_after_f ork_failed regards, saurabh -Original Message- From: Stephan Szabo [mailto:sszabo@;megazone23.bigpanda.com] Sent: Wednesday, October 30, 2002 9:15 PM To: saurabh garg Cc: [EMAIL PROTECTED] Subject: Re: [BUGS] hi-problem while installing postgressql 7.2 version On Wed, 30 Oct 2002, saurabh garg wrote: > while Creating a database cluster postgressql it just hangs. i'm using > these command on cygwin. i gave the command > ./configure > make > make install > make install-all-headers > all above are sucessful. after that i set the environmental path in > profile. now i give initdb -D /usr/local/pgsql/data this command.. > > > > Fixing permissions on existing directory /usr/local/pgsql/data... ok > creating directory /usr/local/pgsql/data/base... ok > creating directory /usr/local/pgsql/data/global... ok > creating directory /usr/local/pgsql/data/pg_xlog... ok > creating directory /usr/local/pgsql/data/pg_clog... ok > creating template1 database in /usr/local/pgsql/data/base/1... > >it just hangs here, now no move further. Are you sure you've started the ipc daemon? I know that it hangs in initdb if you haven't. ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html
[BUGS] hi-problem in creating database in postgresql 7.2.2
hi i have sucessfully installed postgresql. now while creating database it gives the following error. i'm running pgsqlserver on localhost. i give the command createdb -D /usr/local/share/data/data $ createdb -D /usr/local/share/data/data psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"? createdb: database creation failed similar problem is there when i create user. $ createuser saurabh with password 'saurabh'; Shall the new user be allowed to create databases? (y/n) y Shall the new user be allowed to create more new users? (y/n) y psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"? createuser: creation of user "saurabh" failed can u help me please? thnx in advance. regards, saurabh garg ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org
[BUGS] Bug with child tables referencing parent table?
POSTGRESQL BUG REPORT TEMPLATE I think I've found a bug (see below). If you think it's not a bug, I would be thankful for a workaround. I tried omitting the foreign key constraint. That works but is unsatisfactory. Please (also) reply to my email address. Thank you! Your name : Stefan Schwarzer Your email address : [EMAIL PROTECTED] System Configuration - Architecture (example: Intel Pentium) : AMD Athlon Operating System (example: Linux 2.0.26 ELF) : FreeBSD 4.7-STABLE PostgreSQL version (example: PostgreSQL-7.2.3): PostgreSQL-7.2.3 Compiler used (example: gcc 2.95.2) : gcc 2.95.4 Please enter a FULL description of your problem: 1. Create a table 'test_parent' with a serial key 'id' 2. Create a child table 'test_child1' which inherits from 'test_parent' 3. Insert a row into 'test_child1' with id=1 (for example) 4. Create a child table 'test_child2' which also inherits from 'test_parent' and has a foreign key referencing 'test_parent(id)' The resulting inheritance hierarchy is: test_parent (id) ^ ^ | | test_child1 (id)test_child2 (id, parent_id) 5. Insert a row into 'test_child2' which contains the value 1 (see step 3) for the foreign key 6. Step 5 should succeed because id=1 is in fact in 'test_parent' but fails with an error message: ERROR: referential integrity violation - key referenced from test_child2 not found in test_parent Please describe a way to repeat the problem. Please try to provide a concise reproducible example, if at all possible: -- In psql (with some reformatting for better readability): svss=# CREATE TABLE test_parent (id SERIAL); NOTICE: CREATE TABLE will create implicit sequence 'test_parent_id_seq' for SERIAL column 'test_parent.id' NOTICE: CREATE TABLE / UNIQUE will create implicit index 'test_parent_id_key' for table 'test_parent' CREATE svss=# CREATE TABLE test_child1 (i INTEGER) INHERITS (test_parent); CREATE svss=# INSERT INTO test_child1 (id, i) VALUES (1, 2); INSERT 31667553 1 svss=# SELECT * FROM test_child1; id | i +--- 1 | 2 (1 row) svss=# CREATE TABLE test_child2 ( parent_id INTEGER NOT NULL, FOREIGN KEY(parent_id) REFERENCES test_parent(id) ) INHERITS (test_parent); NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) CREATE svss=# INSERT INTO test_child2 (id, parent_id) VALUES (2, 1); ERROR: referential integrity violation - key referenced from test_child2 not found in test_parent If you know how this problem might be fixed, list the solution below: - Sorry, I don't know a fix. ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
[BUGS] Fwd: hi-problem in creating database & user in postgresql
Note: forwarded message attached. Missed your favourite TV serial last night? Try the new, Yahoo! TV. visit http://in.tv.yahoo.com --- Begin Message --- hi while creating user in postgresql. i'm giving these command on cygwin. it's giving the below error. $ createuser administrator with password ' '; Shall the new user be allowed to create databases? (y/n) y Shall the new user be allowed to create more new users? (y/n) n psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"? createuser: creation of user " " failed similar error while creating db. $ createdb mydb psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"? createdb: database creation failed can u help me please? thnx in advance. regards, saurabh Missed your favourite TV serial last night? Try the new, Yahoo! TV. visit http://in.tv.yahoo.com --- End Message --- ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
[BUGS] hi-problem in postgresql postmaster service
hi when i give the postmaster -D option it gives the error below. although i can start post master through pg_ctl command. but when i connect it through jdbc it gives whether your postmaster is running with -i option. i can't give -i option in pg_ctl. $ /usr/bin/postmaster -D /usr/local/saurabh -i -p 666 DEBUG: database system was shut down at 2002-11-01 19:48:27 IST DEBUG: checkpoint record is at 0/11FA38 DEBUG: redo record is at 0/11FA38; undo record is at 0/0; shutdown TRUE DEBUG: next transaction id: 95; next oid: 16557 DEBUG: database system is ready please help me. thanx a lot. regards, saurabh Missed your favourite TV serial last night? Try the new, Yahoo! TV. visit http://in.tv.yahoo.com ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
[BUGS] posgresql 7.3beta3 compile error in src/pl/plperl (perl extension)
Hi. I've got a compile-time error when trying to build postgresql 7.3beta3 with perl: ./configure --with-perl make make[4]: Entering directory `/usr/src/postgresql-7.3b3/src/pl/plpgsql/src' make[4]: Nothing to be done for `all'. make[4]: Leaving directory `/usr/src/postgresql-7.3b3/src/pl/plpgsql/src' make[3]: Leaving directory `/usr/src/postgresql-7.3b3/src/pl/plpgsql' make[3]: Entering directory `/usr/src/postgresql-7.3b3/src/pl/plperl' gcc -O2 -fpic -I. -I/usr/lib/perl5/5.8.0/i686-linux-thread-multi-64int-ld/CORE -I../../../src/include -c -o plperl.o plperl.c In file included from /usr/lib/perl5/5.8.0/i686-linux-thread-multi-64int-ld/CORE/op.h:480, from /usr/lib/perl5/5.8.0/i686-linux-thread-multi-64int-ld/CORE/perl.h:2209, from plperl.c:61: /usr/lib/perl5/5.8.0/i686-linux-thread-multi-64int-ld/CORE/reentr.h:602: field `_crypt_struct' has incomplete type In file included from /usr/lib/perl5/5.8.0/i686-linux-thread-multi-64int-ld/CORE/perl.h:3368, from plperl.c:61: /usr/lib/perl5/5.8.0/i686-linux-thread-multi-64int-ld/CORE/proto.h:246: parse error before `off64_t' /usr/lib/perl5/5.8.0/i686-linux-thread-multi-64int-ld/CORE/proto.h:248: parse error before `Perl_do_sysseek' /usr/lib/perl5/5.8.0/i686-linux-thread-multi-64int-ld/CORE/proto.h:248: parse error before `off64_t' /usr/lib/perl5/5.8.0/i686-linux-thread-multi-64int-ld/CORE/proto.h:248: warning: data definition has no type or storage class /usr/lib/perl5/5.8.0/i686-linux-thread-multi-64int-ld/CORE/proto.h:249: parse error before `Perl_do_tell' /usr/lib/perl5/5.8.0/i686-linux-thread-multi-64int-ld/CORE/proto.h:249: warning: data definition has no type or storage class /usr/lib/perl5/5.8.0/i686-linux-thread-multi-64int-ld/CORE/proto.h:1378: parse error before `Perl_PerlIO_tell' /usr/lib/perl5/5.8.0/i686-linux-thread-multi-64int-ld/CORE/proto.h:1378: warning: data definition has no type or storage class /usr/lib/perl5/5.8.0/i686-linux-thread-multi-64int-ld/CORE/proto.h:1379: parse error before `off64_t' plperl.c: In function `compile_plperl_function': plperl.c:543: warning: cast to pointer from integer of different size plperl.c:724: warning: cast from pointer to integer of different size make[3]: *** [plperl.o] Error 1 make[3]: Leaving directory `/usr/src/postgresql-7.3b3/src/pl/plperl' make[2]: *** [all] Error 2 make[2]: Leaving directory `/usr/src/postgresql-7.3b3/src/pl' make[1]: *** [all] Error 2 make[1]: Leaving directory `/usr/src/postgresql-7.3b3/src' make: *** [all] Error 2 It's linux 2.4 on pentium III, gcc 2.95.3, glibc 2.2, perl 5.8 (with support for large integers (long long, 8 byte)). -- Regards, Igor Shevchenko ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [BUGS] posgresql 7.3beta3 compile error in src/pl/plperl (perl extension)
Igor Shevchenko <[EMAIL PROTECTED]> writes: > I've got a compile-time error when trying to build postgresql 7.3beta3 with > perl: > gcc -O2 -fpic -I. -I/usr/lib/perl5/5.8.0/i686-linux-thread-multi-64int-ld/CORE > -I../../../src/include -c -o plperl.o plperl.c > In file included from > /usr/lib/perl5/5.8.0/i686-linux-thread-multi-64int-ld/CORE/op.h:480, > from > /usr/lib/perl5/5.8.0/i686-linux-thread-multi-64int-ld/CORE/perl.h:2209, > from plperl.c:61: > /usr/lib/perl5/5.8.0/i686-linux-thread-multi-64int-ld/CORE/reentr.h:602: field > `_crypt_struct' has incomplete type This is a bug in Perl 5.8.0. To workaround it, add '-D_GNU_SOURCE' to the CFLAGS for PL/Perl. I'm planning to send in a patch that works around this problem for 7.3 final, but I haven't got a chance yet (if someone feels like doing it, go right ahead). Cheers, Neil -- Neil Conway <[EMAIL PROTECTED]> || PGP Key ID: DB3C29FC ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [BUGS] Bug with child tables referencing parent table?
On Thu, 31 Oct 2002, Stefan Schwarzer wrote: > I think I've found a bug (see below). If you think it's not a bug, I > would be thankful for a workaround. I tried omitting the foreign key > constraint. That works but is unsatisfactory. Foreign key constraints reference only the table named in the constraint, not any of its children and isn't inherited to children. If the row were in test_parent specifically, it would have worked. In general I haven't seen any great workarounds, usually I'd suggest splitting the key columns to a separate table and have the each table in the tree reference that. ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [BUGS] hi-problem in creating database in postgresql 7.2.2
PostgreSQL running under Cygwin does not operate with Unix sockets. You need to start the postmaster with TCP/IP sockets. Simply edit your "postgresql.conf" file (it should be in your postgres data directory) and add the line "tcpip_socket = true", and restart your postmaster. All your postgres commands will have to use --host=localhost to instruct them to use the tcpip socket. Hope that helps! Jord Tanner Independent Gecko Consultants On Thu, 2002-10-31 at 04:57, saurabh garg wrote: > hi > i have sucessfully installed postgresql. now while creating database it > gives the following error. i'm running pgsqlserver on localhost. > > i give the command createdb -D /usr/local/share/data/data > > > $ createdb -D /usr/local/share/data/data > psql: could not connect to server: No such file or directory > Is the server running locally and accepting > connections on Unix domain socket "/tmp/.s.PGSQL.5432"? > createdb: database creation failed > > similar problem is there when i create user. > > $ createuser saurabh with password 'saurabh'; > Shall the new user be allowed to create databases? (y/n) y > Shall the new user be allowed to create more new users? (y/n) y > psql: could not connect to server: No such file or directory > Is the server running locally and accepting > connections on Unix domain socket "/tmp/.s.PGSQL.5432"? > createuser: creation of user "saurabh" failed > > > can u help me please? thnx in advance. > > > regards, > > > saurabh garg > > > > > > ---(end of broadcast)--- > TIP 6: Have you searched our list archives? > > http://archives.postgresql.org ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [BUGS] Wrong order of rows in result during regression test.
I have since fixed this in CVS. Would you please retest? --- Magnus Enbom wrote: > > POSTGRESQL BUG REPORT TEMPLATE > > > > Your name : Magnus Enbom > Your email address : [EMAIL PROTECTED] > > > System Configuration > - > Architecture (example: Intel Pentium) : x86 > > Operating System (example: Linux 2.0.26 ELF) : Linux 2.4.19-gentoo-r7, > glibc-2.2.5 > > PostgreSQL version (example: PostgreSQL-7.3): PostgreSQL-7.3, cvs from today > > Compiler used (example: gcc 2.95.2) : gcc-2.95.3 > > > Please enter a FULL description of your problem: > > During "make installcheck": > ... > test case ... ok > test join ... FAILED > test aggregates ... ok > ... > > > regression.diffs contains: > > *** ./expected/join.out Mon Oct 28 23:54:45 2002 > --- ./results/join.out Tue Oct 29 16:29:18 2002 > *** > *** 1802,1811 >| 6 | 6 | six | >| 7 | 7 | seven | >| 8 | 8 | eight | > - | | | | 0 >| | | null | >| | 0 | zero | >| | | | > (15 rows) > > SELECT '' AS "xxx", * > --- 1802,1811 >| 6 | 6 | six | >| 7 | 7 | seven | >| 8 | 8 | eight | >| | | null | >| | 0 | zero | >| | | | > + | | | | 0 > (15 rows) > > SELECT '' AS "xxx", * > *** > *** 1824,1833 >| 6 | 6 | six | >| 7 | 7 | seven | >| 8 | 8 | eight | > - | | | | 0 >| | | null | >| | 0 | zero | >| | | | > (15 rows) > > SELECT '' AS "xxx", * > --- 1824,1833 >| 6 | 6 | six | >| 7 | 7 | seven | >| 8 | 8 | eight | >| | | null | >| | 0 | zero | >| | | | > + | | | | 0 > (15 rows) > > SELECT '' AS "xxx", * > > == > > > > > > > > > Please describe a way to repeat the problem. Please try to provide a > concise reproducible example, if at all possible: > -- > ./configure --with-pam --with-openssl=/usr --with-java --with-python --with- > perl --with-tcl --enable-debug --enable-depend --enable-cassert --enable-nls --e > nable-recode --prefix=/usr/local/pgsql.current > > make installcheck > > > > > If you know how this problem might be fixed, list the solution below: > - > > > > > ---(end of broadcast)--- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED]) > -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org
Re: [BUGS] Bug #805: pg_dump examines all tables even with -t "table_name"
We are thinking of adding a per-schema dump option in 7.4. Would that help? --- Vitaliy Fuks wrote: > Hello, > > Could there potentially be an option in addition to -t "table_name", to > either: > > a) Examine all relationships and dump all dependant objects > b) Dump only table named "table_name" > > One can argue that when asking for "a" table one really only wants that > table information, and nothing else. Some people of course can argue > that just a table by itself may not be usable by itself in some > situations - so that's why the option described above could cater both > situations. > > I wish I could just give you a patch but there are probably people who > know pg_dump internals who could produce such patch in 10x less amount > of time. > > --Vitaliy > > --- Tom Lane <[EMAIL PROTECTED]> wrote: > > [EMAIL PROTECTED] writes: > > > pg_dump examines all tables even with -t "table_name" speficied > > > > 7.3 is a little better. It's not that easy to determine in advance > > what > > information is needed, though; consider inheritance for example. > > > > regards, tom lane > > > __ > Do you Yahoo!? > HotJobs - Search new jobs daily now > http://hotjobs.yahoo.com/ > > ---(end of broadcast)--- > TIP 4: Don't 'kill -9' the postmaster > -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html
Re: [BUGS] [ADMIN] PostgreSQL Installation on SCO
Have you read the SCO FAQ? http://www.us.postgresql.org/users-lounge/docs/faq.html Also, we are about to release 7.3. Would you please try 7.3beta3 and let us know how that works? --- Shibashish wrote: > Dear Sir, > I use SCO Open Server 5.0.5 on an intel box. Although I have installed and > used PostgreSQL on Linux, setting it on SCO has not been smooth :) > I have downloaded the latest version ie "Postgresql-7.2.3." > I also installed "ant" package for using java. I have "tcl8.0," "tk8.0," > "itclsh3.0" and "itkwish3.0" installed in my system. > "gcc version 2.7.2.1" > " Java 2 SDK, Standard Edition, v. 1.2.1" > > My "configure" command was as following ... > ./configure --prefix=/data/pgsql --with-perl --with-tcl > --with-tclconfig=/data/tcl/lib --with-tkconfig=/data/tk/lib --with-java > > The last output were > ... > updating cache ./config.cache > creating ./config.status > creating GNUmakefile > creating src/GNUmakefile > creating src/Makefile.global > creating src/backend/port/Makefile > creating src/include/pg_config.h > linking ./src/backend/port/dynloader/sco.c to src/backend/port/dynloader.c > linking ./src/backend/port/dynloader/sco.h to src/include/dynloader.h > linking ./src/include/port/sco.h to src/include/pg_config_os.h > linking ./src/makefiles/Makefile.sco to src/Makefile.port > linking ./src/backend/port/tas/dummy.s to src/backend/port/tas.s > > Then i give the "gmake" command. The compiling stops on an error and > exits after some time. The "messages" in this step 2 (step2mesg.txt) and > the "errors" (step2err.txt) are reproduced in the 2 text files attached. > > I'd be thankful to you if you can help me out sort the problem. I got your > mail-ids from the net and came to know that you are working on the similar > lines. > > Waiting for a quick response from your end. kindly inform me if you have > already solved the problem, or whether any patch is available. Any > documentation or url will be highly helpful. > > Thanking You in anticipation. > > with regards > Shibashish Satpathy > [EMAIL PROTECTED] > Software Engineer > IIT Bombay, India > Content-Description: [ Attachment, skipping... ] Content-Description: [ Attachment, skipping... ] > > ---(end of broadcast)--- > TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED] -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])