Re: [BUGS] Unable to handle error in plperl
On Wed, Jul 10, 2013 at 2:36 PM, Alex Lai wrote: > Dear all, > > I have a situation. I am unable to pass control back to the function once > it hit the "undefined_column" error code. > I am not sure there's a way to return '123' instead exit from the function. > > Here is my code > > CREATE OR REPLACE FUNCTION foo() RETURNS text as $$ > my $sql = ""; > my $status = ""; > my $r = ""; > $sql = 'SELECT non_exist_column from a_table limit 1'; > eval { spi_exec_query($sql);}; > if ($@) { > $status = 'invalid: '.$@; > elog(ERROR, $status); Its this bit here that is tripping you up. Perhaps you meant elog(INFO, ...) or something? -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
[BUGS] BUG #8294: new timeline 6 forked off current dat abase system timeline 5 before current recovery point 0/100000
The following bug has been logged on the website: Bug reference: 8294 Logged by: digoal.zhou Email address: dig...@126.com PostgreSQL version: Unsupported/Unknown Operating system: CentOS 5.8 x64 Description: PostgreSQL 9.3 beta2 stream replication primary and standby cann't switchover. Primary : psql checkpont; pg_controldata pg_control version number:937 Catalog version number: 201306121 Database system identifier: 5899156703623933927 Database cluster state: in production pg_control last modified: Thu 11 Jul 2013 11:05:38 AM CST Latest checkpoint location: 0/C60 Prior checkpoint location:0/B60 Latest checkpoint's REDO location:0/C28 Latest checkpoint's REDO WAL file:0004000C Latest checkpoint's TimeLineID: 4 Latest checkpoint's PrevTimeLineID: 4 Latest checkpoint's full_page_writes: on Latest checkpoint's NextXID: 0/1850 Latest checkpoint's NextOID: 32768 Latest checkpoint's NextMultiXactId: 1 Latest checkpoint's NextMultiOffset: 0 Latest checkpoint's oldestXID:1674 Latest checkpoint's oldestXID's DB: 1 Latest checkpoint's oldestActiveXID: 1850 Latest checkpoint's oldestMultiXid: 1 Latest checkpoint's oldestMulti's DB: 1 Time of latest checkpoint:Thu 11 Jul 2013 11:05:38 AM CST Fake LSN counter for unlogged rels: 0/1 Minimum recovery ending location: 0/0 Min recovery ending loc's timeline: 0 Backup start location:0/0 Backup end location: 0/0 End-of-backup record required:no Current wal_level setting:hot_standby Current max_connections setting: 1 Current max_prepared_xacts setting: 0 Current max_locks_per_xact setting: 64 Maximum data alignment: 8 Database block size: 8192 Blocks per segment of large relation: 131072 WAL block size: 16384 Bytes per WAL segment:16777216 Maximum length of identifiers:64 Maximum columns in an index: 32 Maximum size of a TOAST chunk:1996 Date/time type storage: 64-bit integers Float4 argument passing: by value Float8 argument passing: by value Data page checksum version: 0 Standby : pg_control version number:937 Catalog version number: 201306121 Database system identifier: 5899156703623933927 Database cluster state: in archive recovery pg_control last modified: Thu 11 Jul 2013 11:05:29 AM CST Latest checkpoint location: 0/B60 Prior checkpoint location:0/B60 Latest checkpoint's REDO location:0/B28 Latest checkpoint's REDO WAL file:0004000B Latest checkpoint's TimeLineID: 4 Latest checkpoint's PrevTimeLineID: 4 Latest checkpoint's full_page_writes: on Latest checkpoint's NextXID: 0/1850 Latest checkpoint's NextOID: 32768 Latest checkpoint's NextMultiXactId: 1 Latest checkpoint's NextMultiOffset: 0 Latest checkpoint's oldestXID:1674 Latest checkpoint's oldestXID's DB: 1 Latest checkpoint's oldestActiveXID: 1850 Latest checkpoint's oldestMultiXid: 1 Latest checkpoint's oldestMulti's DB: 1 Time of latest checkpoint:Thu 11 Jul 2013 11:04:57 AM CST Fake LSN counter for unlogged rels: 0/1 Minimum recovery ending location: 0/BF0 Min recovery ending loc's timeline: 4 Backup start location:0/0 Backup end location: 0/0 End-of-backup record required:no Current wal_level setting:hot_standby Current max_connections setting: 1 Current max_prepared_xacts setting: 0 Current max_locks_per_xact setting: 64 Maximum data alignment: 8 Database block size: 8192 Blocks per segment of large relation: 131072 WAL block size: 16384 Bytes per WAL segment:16777216 Maximum length of identifiers:64 Maximum columns in an index: 32 Maximum size of a TOAST chunk:1996 Date/time type storage: 64-bit integers Float4 argument passing: by value Float8 argument passing: by value Data page checksum version: 0 Primary : pg_ctl stop waiting for server to shut down done server stopped pg_controldata pg_control version number:937 Catalog version number: 201306121 Database system identifier: 5899156703623933927 Database cluster state: shut down pg_control last modified: Thu 11 Jul 2013 11:06:31 AM CST Latest checkpoint location: 0/D28 Prior checkpoint location:0/C60 Latest checkpoint's REDO location:0/D28 Latest checkpoint's REDO WAL file:0004000D Latest checkpoint's TimeLineID: 4 Latest c
[BUGS] Re: BUG #5807: psql fails to launch with "Cannot read termcap database; using dumb terminal settings. Aborted"
Hi, It worked for me: "infocmp -C > /etc/termcap" Thank you so much! - Hari -- View this message in context: http://postgresql.1045698.n5.nabble.com/BUG-5807-psql-fails-to-launch-with-Cannot-read-termcap-database-using-dumb-terminal-settings-Aborted-tp3321689p5763464.html Sent from the PostgreSQL - bugs mailing list archive at Nabble.com. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
[BUGS] BUG #8295: crypt() function fails randomly
The following bug has been logged on the website: Bug reference: 8295 Logged by: Dek Email address: dek.maul...@gmail.com PostgreSQL version: 9.2.4 Operating system: windows server 2008 R2 standard SP1 64 bit Description: crypt function fails with does not exist. This happens randomly and trying the same command again works. Verbose Error log: 2013-07-11 12:33:42 CDT LOCATION: pq_recvbuf, src\backend\libpq\pqcomm.c:839 2013-07-11 12:35:14 CDT ERROR: 42888: function crypt(character varying, character varying) does not exist at character 80 2013-07-11 12:35:14 CDT HINT: No function matches the given name and argument types. You might need to add explicit type casts. 2013-07-11 12:35:14 CDT LOCATION: ParseFuncOrColumn, src\backend\parser\parse_func.c:304 2013-07-11 12:35:14 CDT STATEMENT: select count(*) ct from root.sysuser where user_id = 115 and (user_login_pwd = crypt('testpass'::character varying, user_login_pwd)) = true Running the same command again works: brazil=# select count(*) ct from root.sysuser where user_id = 115 and (user_login_pwd = crypt('testpass'::character varying, user_login_pwd)) = true; ct 0 (1 row) extension pgcrypto is installed via create extension pgcrypto. Thanks. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs