Re: [GENERAL] compilation postgresql/solaris error

2005-06-21 Thread Michael Fuhr
thout any problems. > ../../../../src/include/utils/builtins.h:837: internal compiler error: > Segmentation Fault > Please submit a full bug report, > with preprocessed source if appropriate. > See http://gcc.gnu.org/bugs.html> for instructions. Looks like you should contact the co

Re: [GENERAL] users, address record restrictions

2005-06-20 Thread Michael Fuhr
he documentation: http://www.postgresql.org/docs/8.0/static/server-programming.html You could also search the list archives for phrases like "CREATE FUNCTION" -- many examples have been posted to the mailing lists over the years. See also resources like the General Bits newsletter: http:

Re: [GENERAL] External (asynchronous) notifications of database updates

2005-06-20 Thread Michael Fuhr
se replication tools must have existed > before the LISTEN/NOTIFY mechanism has been introduced to PG. Have they? I don't know the history of the replication tools, but the Release Notes for Postgres95 0.03 from ten years ago mention LISTEN/NOTIFY: http://www.postgresql.org/docs/8.0/s

Re: [GENERAL] External (asynchronous) notifications of database updates

2005-06-20 Thread Michael Fuhr
le > hack - when I get a notification, I wait for 10 seconds and then read > the whole table... It works for me now, but might not work tomorrow. What do you mean by "notification"? A trigger-based notification? Or are you already using LISTEN/NOTIFY? -- Michael Fuhr http://www.

Re: [GENERAL] plpgsql constraint checked data fails to restore

2005-06-20 Thread Michael Fuhr
checked when it's inserted or updated, but not when the referred-to data is modified. For that you'd need another constraint or trigger that knows how to check all the dependent data. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)-

Re: [GENERAL] plpgsql constraint checked data fails to restore

2005-06-19 Thread Michael Fuhr
ilities. Perhaps you should rethink using a check constraint that depends on other data -- what's that check do? Is it something that a foreign key constraint couldn't handle? -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 8: explain analyze is your friend

Re: [GENERAL] Deleting a rule?

2005-06-17 Thread Michael Fuhr
On Fri, Jun 17, 2005 at 03:27:30PM -0700, Benjamin Smith wrote: > > How do I drop a rule? With DROP RULE. Here's a link to the documentation for the latest release: http://www.postgresql.org/docs/8.0/static/sql-droprule.html If that doesn't work then please provide more in

Re: [GENERAL] psql: FATAL: database "template1" is not currently accepting connections

2005-06-17 Thread Michael Fuhr
following query? SELECT datname, datallowconn FROM pg_database; -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL

Re: [GENERAL] Setting all elements in an Bool[] array to the same value

2005-06-10 Thread Michael Fuhr
o ORDER BY id; id | barray |iarray +---+------- 1 | {f,f} | {0,0,0} 2 | {f,f,f,f} | {0,0,0,0,0,0} (2 rows) -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: [GENERAL] Reliably finding temporary table

2005-06-10 Thread Michael Fuhr
IN BEGIN CREATE TEMPORARY TABLE test_date_time (...); EXCEPTION WHEN DUPLICATE_TABLE THEN NULL; END; RETURN; END; $$ LANGUAGE plpgsql VOLATILE; -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [GENERAL] return two elements

2005-06-08 Thread Michael Fuhr
wing example works in HEAD: CREATE FUNCTION foo(INOUT y integer, OUT z integer) RETURNS SETOF record AS $$ BEGIN y := y + 1; z := y + 2; RETURN NEXT; y := y + 1; z := z + 3; RETURN NEXT; y := y + 1; z := z + 4; RETURN NEXT; END; $$ LANGUAGE plpgsql; SELECT * FROM foo(1); y | z

Re: [GENERAL] Copying data from int column to array column

2005-06-08 Thread Michael Fuhr
n empty array: UPDATE test SET field3 = '{}' WHERE field3 IS NULL; UPDATE test SET field3[1] = field1; -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [GENERAL] Password authentication failed for user

2005-06-07 Thread Michael Fuhr
ins by IP address? If so, has the user's IP address changed? It might be useful to see the contents of pg_hba.conf. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [GENERAL] return two elements

2005-06-07 Thread Michael Fuhr
ions that use OUT: http://developer.postgresql.org/docs/postgres/plpgsql-declarations.html#PLPGSQL-DECLARATION-ALIASES -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: [GENERAL] return two elements

2005-06-07 Thread Michael Fuhr
res/xfunc-sql.html#XFUNC-OUTPUT-PARAMETERS -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [GENERAL] how to get sequence list ?

2005-06-06 Thread Michael Fuhr
/www.postgresql.org/docs/8.0/static/app-psql.html http://www.postgresql.org/docs/8.0/static/catalog-pg-class.html Alternatively, you could try to query the sequence itself: SELECT * FROM seq_serial; -- Michael Fuhr http://www.fuhr.org/~mfuhr/ -

Re: [GENERAL] transactions

2005-06-06 Thread Michael Fuhr
because of something Transaction A did previously. Foreign key relationships are a typical cause, but even UPDATEs on simple tables can cause later operations to deadlock if the application isn't careful with its order of operations. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---

Re: [GENERAL] Download mirrors not found?

2005-06-06 Thread Michael Fuhr
ere were any problems around the time you checked (presumably around 07:00 UTC, based on your message time). -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org

Re: [GENERAL] survey of the postgresql communiity

2005-06-05 Thread Michael Fuhr
74.php I've been asked to be interviewed for this study. Is anybody familiar with this organization? Has anybody else been contacted privately? If so, what were your thoughts about participating? Feel free to respond off-list if you prefer. Thanks. -- Michael Fuhr http://ww

Re: [GENERAL] SQL call to get pid of current connection

2005-06-02 Thread Michael Fuhr
ing Database Activity" chapter; it's been around since 7.3: http://www.postgresql.org/docs/7.3/interactive/release-7-3.html http://www.postgresql.org/docs/7.3/interactive/monitoring-stats.html http://www.postgresql.org/docs/7.4/interactive/monitoring-stats.html http://www.postgresql.o

Re: [GENERAL] writing a file using procedure

2005-06-02 Thread Michael Fuhr
pabilities of the underlying > procedural language. To qualify the above: only database superusers can create functions written in an untrusted language, but any user can call such functions. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)---

Re: [GENERAL] plpython error since upgrading from 7.x to 8.x

2005-05-25 Thread Michael Fuhr
cause when the event is INSERT, TD["old"] is None and thus unsubscriptable. But if that's the case then I'm not sure why the version of PostgreSQL would matter, and without seeing a complete example I'm not convinced that it does. Do you still get the error if you check i

Re: [GENERAL] plpython error since upgrading from 7.x to 8.x

2005-05-25 Thread Michael Fuhr
ct Could you post a simple, self-contained example that exhibits this problem? Debugging would be easier if we could see what you're doing. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 9: the planner will ignore your

Re: [GENERAL] Executing Dynamic DDL

2005-05-18 Thread Michael Fuhr
declared VOLATILE. And if the function requires a non-NULL parameter then it should be STRICT as well. BTW, the all_table_columns table appears to duplicate information already contained in the system catalogs. Is this a contrived example or are you really doing that? Do you have a reason for d

Re: [GENERAL] Sequences question & problem

2005-05-16 Thread Michael Fuhr
al column "foo.id" CREATE TABLE test=> ALTER TABLE foo RENAME TO foo2; ALTER TABLE test=> ALTER TABLE foo2 RENAME id TO id2; ALTER TABLE test=> SELECT pg_get_serial_sequence('foo2', 'id2'); pg_get_serial_sequence public.foo_id_seq (1 row) -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org

Re: [GENERAL] function bit(integer)

2005-05-15 Thread Michael Fuhr
| bit, integer, boolean pg_catalog | bit | bit | integer (3 rows) See also the 8.0 Release Notes to see how casting to bit(n) has changed. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [GENERAL] Error when try installing pgbench ?

2005-05-15 Thread Michael Fuhr
of GNU make. Install the latter if you haven't already and use gmake instead of make. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Re: [GENERAL] Array manipulation/syntax question

2005-05-09 Thread Michael Fuhr
SELECT some_column FROM some_table); See "Array Constructors" in the "Value Expressions" section of the "SQL Syntax" chapter of the documentation: http://www.postgresql.org/docs/8.0/interactive/sql-expressions.html#SQL-SYNTAX-ARRAY-CONSTRUCT

Re: [GENERAL] Extracting date from timestamp

2005-05-06 Thread Michael Fuhr
s and Operators" chapter of the documentation. http://www.postgresql.org/docs/8.0/interactive/functions-formatting.html http://www.postgresql.org/docs/8.0/interactive/functions-datetime.html -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--

Re: [GENERAL] Cursor problem

2005-05-06 Thread Michael Fuhr
out returning cursors from a PL/pgSQL function, see the documentation: http://www.postgresql.org/docs/8.0/interactive/plpgsql-cursors.html -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [GENERAL] plpythonu and dollar quoting

2005-05-03 Thread Michael Fuhr
x27;d get a similar error in earlier versions. What version are you using? What does "SELECT version();" show? -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [GENERAL] postgresql 8 abort with signal 10

2005-05-03 Thread Michael Fuhr
On Tue, May 03, 2005 at 10:37:03AM -0600, Michael Fuhr wrote: > > Signal 10 is SIGBUS (bus error) on FreeBSD 4.11. Somewhere under > $PGDATA there might be a core dump named postmaster.core Correction: the core dump should be named postgres.core (at least it is on my FreeBSD 4.11-STAB

Re: [GENERAL] postgresql 8 abort with signal 10

2005-05-03 Thread Michael Fuhr
ld be named "postgres.core", not just "core", and it should be somewhere under $PGDATA. Whether a core file is produced is also affected by the kern.coredump sysctl setting and the coredumpsize resource limit. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ -

Re: [GENERAL] postgresql 8 abort with signal 10

2005-05-03 Thread Michael Fuhr
th debugging info. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [GENERAL] unable to open editor.

2005-05-02 Thread Michael Fuhr
ToolTalk error. What editor are you trying to use? What's the value of the PSQL_EDITOR or EDITOR or VISUAL environment variable? Have you googled for this error message to see what might cause it and how to fix it? -- Michael Fuhr http://www.fuhr.org/~mfuhr/ --

Re: [GENERAL] out of memory for query result

2005-04-29 Thread Michael Fuhr
On Fri, Apr 29, 2005 at 10:47:36AM -0500, [EMAIL PROTECTED] wrote: > > DBD::Pg::st execute failed: out of memory for query result Have you considered using a cursor to fetch the query results? That should prevent the API from trying to load the entire result set into memory. -- Michae

Re: [GENERAL] Problem: message type 0xxx arrived from server while idle

2005-04-29 Thread Michael Fuhr
have some script, which dynamically outputs web-page content > and have get_user function call. > > If i update that page in browser too fast, then web server seems to hang up. What do you mean by "update too fast"? What exactly are you doing? -- Mic

Re: [GENERAL] Returning a RECORD, not SETOF RECORD

2005-04-28 Thread Michael Fuhr
ssed before or not. If nobody answers here then you might try pgsql-hackers. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match

Re: [GENERAL] oid or schema name of current plpgsql function

2005-04-28 Thread Michael Fuhr
need is to extract the name of the schema where the > function is stored. Why do you need to know the function's schema? What are you trying to do? -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 2: you can get

Re: [GENERAL] Returning a RECORD, not SETOF RECORD

2005-04-28 Thread Michael Fuhr
AS s; z | y | x | b | a ---++++ 2005-04-28 12:47:17.953952-06 | 25 | 15 | 20 | 10 2005-04-28 12:47:17.954543-06 | 45 | 35 | 40 | 30 (2 rows) -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end

Re: [GENERAL] populating a table via the COPY command using C code.

2005-04-27 Thread Michael Fuhr
you have a reason for using an intermediate file? Instead of writing data to the file and then reading it back, you could use PQputCopyData() or PQputline() to send the data directly to the database. Another possibility: if the file resides somewhere the backend can read, and if you can connect to th

Re: [GENERAL] populating a table via the COPY command using C code.

2005-04-27 Thread Michael Fuhr
iated with the COPY Command" in the libpq chapter of the documentation? http://www.postgresql.org/docs/8.0/interactive/libpq-copy.html -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 6: Have you searched our list archiv

Re: [GENERAL] After insert trigger question

2005-04-27 Thread Michael Fuhr
make a trigger before or after, the before case is more efficient, since the information about the operation doesn't have to be saved until end of statement." -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 8: explain analyze is your friend

Re: [GENERAL] After insert trigger question

2005-04-27 Thread Michael Fuhr
T: PL/pgSQL function "trigfunc" line 4 at assignment SELECT * FROM foo; x --- (0 rows) -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 8: explain analyze is your friend

Re: [GENERAL] About index - "a query or data manipulation command can use at most one index per table"

2005-04-26 Thread Michael Fuhr
an index if one is available: if the planner thinks a sequential scan will be faster than using an index, then it won't use the index. If you want to see whether an index scan *could* be used, then set enable_seqscan to off before running EXPLAIN. -- Michael Fuhr http://www.fuhr.org/~mfuhr/

Re: [GENERAL] question about about future 8.1 and IN, INOUT, and OUT parameters

2005-04-25 Thread Michael Fuhr
BLE STRICT; SELECT foo(10, 20); foo - (25,15) (1 row) SELECT (foo(10, 20)).*; y | z + 25 | 15 (1 row) SELECT (foo).* FROM (SELECT foo(10, 20)) AS s; y | z ----+ 25 | 15 (1 row) -- Michael Fuhr http://www.fuhr.org/~mfuhr/ --

Re: [GENERAL] plpgsql function not working

2005-04-25 Thread Michael Fuhr
g(): SELECT array_to_string(array( SELECT groupname FROM userinfo.userdb_groups WHERE username = 'jruff' ), ','); -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [GENERAL] DDL from psql console?

2005-04-25 Thread Michael Fuhr
On Mon, Apr 25, 2005 at 10:44:14AM -0500, John Browne wrote: > > Yeah, I know about pg_dump. I just was curious if there was another > way, since I always have two psql consoles already open at all times > anyway. :-) You could do "\!pg_dump ..." -- Michael Fuhr http

Re: [GENERAL] Immutable attributes?

2005-04-25 Thread Michael Fuhr
er. > > Do you mean that PostgreSQL 8 has immutable attributes ? I do not find > that. I think that was a comment about upgrading in general, not an implication that 8.0 supports a particular feature. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast

Re: [GENERAL] timezone() with timeofday() converts the wrong direction?

2005-04-25 Thread Michael Fuhr
ow to do it in practice in modern versions of PostgreSQL. As far as I can tell it's not possible (short of changing the type to text, as one of my earlier examples did), but again, I'd be pleased to be corrected (preferably with an example that works in 8.0.2). B

Re: [GENERAL] Immutable attributes?

2005-04-24 Thread Michael Fuhr
me text NOT NULL ); CREATE TRIGGER check_immutable BEFORE UPDATE ON foo FOR EACH ROW EXECUTE PROCEDURE noup('id'); INSERT INTO foo (name) VALUES ('name 1'); UPDATE foo SET id = 2; WARNING: id: update not allowed UPDATE 0 UPDATE foo SET name = 'nam

Re: [GENERAL] timezone() with timeofday() converts the wrong direction?

2005-04-24 Thread Michael Fuhr
SET show time zone; TimeZone -- 02:00:00 (1 row) insert into test (f) values (now()); INSERT 0 1 SELECT * from test; f -- 2005-04-25 00:28:33.34721+02 (1 row) select f, f::timestamp at time zone

Re: [GENERAL] timezone() with timeofday() converts the wrong direction?

2005-04-24 Thread Michael Fuhr
21 22:00:00+00 > > Doesn't "at time zone" do what you need ? Not as far as I can tell, because if the result is timestamp with time zone then it's rotated to the local time zone for display. If you can post a counterexample then I'd b

Re: [GENERAL] [Question]batch execute sql command

2005-04-24 Thread Michael Fuhr
"psql -f filename" or, if your shell supports redirection, "psql < filename". See the psql documentation for details: http://www.postgresql.org/docs/8.0/interactive/app-psql.html If that's not what you're looking for, then please provide more informatio

Re: [GENERAL] Table modifications with dependent views - best practices?

2005-04-23 Thread Michael Fuhr
a lock that conflicts with T1's lock on foo. Both transactions are waiting for the other to release a lock, so we get deadlock. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings

Re: [GENERAL] pg_dump serial UNIQUE NOT NULL PRIMARY KEY

2005-04-22 Thread Michael Fuhr
E ONLY cases ADD CONSTRAINT cases_pkey PRIMARY KEY (id); Presumably that's because adding the primary key constraint after populating the table is more efficient than populating the table with the constraint (and the associated index) in place. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ -

Re: [GENERAL] Record as a parameter to a function

2005-04-22 Thread Michael Fuhr
On Fri, Apr 22, 2005 at 03:31:59AM +0100, Carlos Correia wrote: > Michael Fuhr wrote: > | On Fri, Apr 22, 2005 at 01:44:24AM +0100, Carlos Correia wrote: > | > |>carlos=# insert into test (c1) values( 'test'); > |>ERROR: NEW used in query that is not in a rule

Re: [GENERAL] Table modifications with dependent views - best practices?

2005-04-22 Thread Michael Fuhr
s back, then nobody else will ever have seen the changes; if it commits then the changes all become visible at the same time. Try it and see what happens. You might see blocking and you might be able to cause deadlock, but you shouldn't ever see some changes but not

Re: [GENERAL] listing all tables

2005-04-21 Thread Michael Fuhr
resql.org/docs/8.0/interactive/catalogs.html http://www.postgresql.org/docs/8.0/interactive/information-schema.html One way to learn more about the system catalogs is to run "psql -E" or execute "\set ECHO_HIDDEN" from within psql so you can see the queries psql sends for commands like

Re: [GENERAL] Regular expression. How to disable ALL meta-character

2005-04-21 Thread Michael Fuhr
7;) in lower('aBcDeF')); position -- 0 (1 row) You might also want to look at the contrib/pg_trgm module to see if it would be useful. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org

Re: [GENERAL] Table modifications with dependent views - best practices?

2005-04-21 Thread Michael Fuhr
ons: so that a mistake doesn't leave me with half-done work (any error will cause the entire transaction to roll back), and to make the changes atomic for the benefit of other transactions. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--

Re: [GENERAL] timezone() with timeofday() converts the wrong direction?

2005-04-21 Thread Michael Fuhr
21 15:00:00-07', 'PST8PDT') AS pacific, tzconvert('2005-04-21 15:00:00-07', 'UTC') AS utc; pacific | utc ----+ 2005-04-21 15:00:00-07 | 2005-04-21 22:00:00+00 (1 row) Maybe somebody knows of an easier way to do that. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [GENERAL] Record as a parameter to a function

2005-04-21 Thread Michael Fuhr
test=> INSERT INTO test (c1) VALUES ('Test'); NOTICE: Test INSERT 0 1 Hope this helps. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: [GENERAL] timezone() with timeofday() converts the wrong direction?

2005-04-21 Thread Michael Fuhr
ting it to timestamptz puts it in your local time zone: SELECT '2005-04-21 23:25:12.868212'::timestamptz; timestamptz --- 2005-04-21 23:25:12.868212-07 (1 row) -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Re: [GENERAL] timezone() with timeofday() converts the wrong direction?

2005-04-21 Thread Michael Fuhr
akes a zone-less time stamp and interprets it as UTC time to produce a UTC time stamp, which is then rotated to PDT (UTC-7) for display. Perhaps this is what you want: SELECT timezone('UTC', timeofday()::timestamptz); -- Michael Fuhr http://www.fuhr.org/~mfuhr/ --

Re: [GENERAL] Regular expression. How to disable ALL meta-character in a regular expression

2005-04-20 Thread Michael Fuhr
'; ?column? -- f (1 row) SELECT 'test[* string' ~ '***=test[*'; ?column? -- t (1 row) -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [GENERAL] lots of puzzling log messages

2005-04-20 Thread Michael Fuhr
doing it under the hood. If you're logging queries then you should be able to figure out where this is happening in the application. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 3: if posting/reading through

Re: [GENERAL] substring and POSIX re's

2005-04-19 Thread Michael Fuhr
On Tue, Apr 19, 2005 at 12:39:52PM -0400, Alvaro Herrera wrote: > On Tue, Apr 19, 2005 at 10:03:45AM -0600, Michael Fuhr wrote: > > On Tue, Apr 19, 2005 at 11:17:46AM -0500, Don Isgitt wrote: > > > > > > Thanks, Tom. Interestingly enough, neither my original query o

Re: [GENERAL] substring and POSIX re's

2005-04-19 Thread Michael Fuhr
hem in 7.3.9, 7.4.7, 8.0.2, or 8.1devel. What's different about your 7.4 installation? -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command

Re: [GENERAL] What means Postgres?

2005-04-19 Thread Michael Fuhr
ive/history.html According to "The design of POSTGRES" by Stonebreaker and Rowe, POSTGRES means "POST inGRES" (the successor to INGRES). Various other sources say that INGRES means "INteractive Graphics (and) REtrieval System." -- Michael Fuhr http://www.fuhr.o

Re: [GENERAL] Datatypes in PL/PSQL functions with multiple arguments

2005-04-19 Thread Michael Fuhr
ents. Please post an example of what you're doing: a simple function, how you're invoking it, and the error message(s). -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [GENERAL] "pltcl" function.

2005-04-18 Thread Michael Fuhr
this error: > > ERROR: wrong # args: should be "set varName ?newValue?" You're mixing languages: you're using the SQL concatenation operator (||) in a Tcl function. See a Tcl reference for the details of Tcl syntax. The following should work: set var "SENDING EMAIL

Re: [GENERAL] How to include "EXCEPTION" handling block in PL/TCL function.

2005-04-18 Thread Michael Fuhr
ails, especially section 4.2 SMTP Replies and section 4.3 Sequencing of Commands and Replies: ftp://ftp.rfc-editor.org/in-notes/rfc2821.txt -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 6: Have you searche

Re: [GENERAL] Help with a plperl function

2005-04-18 Thread Michael Fuhr
= $rv->{rows}[$rn]; push @$res, {item_id => $row->{item_id}, description => $row->{item_descr}, order_date => $row->{start_date}}; -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)-

Re: [GENERAL] Division by zero

2005-04-16 Thread Michael Fuhr
l that function instead of using the / operator. I'd avoid any temptation to change the behavior of the operator itself because that could cause problems in other code that isn't expecting it. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)-

Re: [GENERAL] psql performance

2005-04-14 Thread Michael Fuhr
orks: http://www.postgresql.org/docs/7.4/interactive/queries-union.html "Furthermore, it eliminates all duplicate rows, in the sense of DISTINCT, unless UNION ALL is used." -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [GENERAL] client interfaces

2005-04-12 Thread Michael Fuhr
(AF_UNIX) sockets if your system does. They still use the socket interface, but they're typically faster than a TCP connection. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: [GENERAL] contrib/dbsize

2005-04-05 Thread Michael Fuhr
On Tue, Apr 05, 2005 at 01:43:56PM -0400, Joseph Shraibman wrote: > > Can I take the new .c file, do a make install, and have it work in 7.4.7 ? Not unmodified, since it uses features new to 8.0 (e.g., tablespaces). -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(

Re: [GENERAL] contrib/dbsize

2005-04-05 Thread Michael Fuhr
, compiled by GCC gcc (GCC) 3.4.2 (1 row) test=> SELECT relation_size('pg_am_oid_index'); relation_size --- 16384 (1 row) -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [GENERAL] contrib/dbsize

2005-04-05 Thread Michael Fuhr
elation_size() correctly showed the on-disk size of the file that stores the index. Are you expecting something different? Or have you found a case where relation_size() returns the wrong value? -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--

Re: [GENERAL] How to dump data from database?

2005-04-04 Thread Michael Fuhr
L? Why can't you just run pg_dump from > MF> outside the database? > > Pls, write a small sample of the function . Could you tell us why you want to run pg_dump from SQL? What problem are you trying to solve? -- Michael Fuhr http://www.fuhr.org/~mfuhr/

Re: [GENERAL] How to dump data from database?

2005-04-04 Thread Michael Fuhr
in a procedural language like PL/Perl, PL/Python, or PL/Tcl that runs pg_dump, but why do you need to do this from SQL? Why can't you just run pg_dump from outside the database? -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)---

Re: [GENERAL] How to dump data from database?

2005-04-04 Thread Michael Fuhr
On Mon, Apr 04, 2005 at 11:18:08AM +0400, go wrote: > > Tell me please is there any way to dump data from current session > (instead of using pg_dump) ? What exactly are you trying to do? Will COPY (or psql's \copy) do what you want? -- Michael Fuhr http://www.f

Re: [GENERAL] How to copy from Table to table

2005-04-02 Thread Michael Fuhr
hen you can use TRUNCATE or DELETE to empty it, then INSERT ... SELECT to insert the results of a query. Another possibility would be to DROP the table and use CREATE TABLE AS or SELECT INTO, but then you'd have to recreate any indexes, constraints, triggers, etc. -- Michael

Re: [GENERAL] Debugging deadlocks

2005-04-02 Thread Michael Fuhr
= 'fruit'::regtype; -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message c

Re: [GENERAL] join error?

2005-04-02 Thread Michael Fuhr
ot; chapter in the documentation for more info. http://www.postgresql.org/docs/8.0/interactive/runtime-config.html#GUC-ADD-MISSING-FROM There's been a proposal to disable add_missing_from by default in a future version of PostgreSQL. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ --

Re: [GENERAL] SELECT INTO Array?

2005-04-01 Thread Michael Fuhr
ions if we knew the "what" rather than focusing on a particular "how." -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: : [GENERAL] Postgres order by into a RECORD, not ordering

2005-04-01 Thread Michael Fuhr
aybe somebody can explain what's wrong. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your

Re: [GENERAL] inherited type

2005-04-01 Thread Michael Fuhr
--+- parent | 1 child | 2 (2 rows) -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match

Re: [GENERAL] SELECT INTO Array?

2005-03-31 Thread Michael Fuhr
Selecting multiple columns into an array doesn't work in SQL or PL/pgSQL -- that could cause problems in the general case because columns might have different types and arrays contain elements of the same type. However, some other languages' interfaces to PostgreSQL can re

Re: [GENERAL] table permissions

2005-03-31 Thread Michael Fuhr
tors" chapter of the documentation. Here's a link to the latest version: http://www.postgresql.org/docs/8.0/interactive/functions-info.html#FUNCTIONS-INFO-ACCESS-TABLE -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)-

Re: [GENERAL] plpgsql array initialization, what's the story?

2005-03-31 Thread Michael Fuhr
ELECT foo(); foo - {1,2,3} (1 row) -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match

Re: [GENERAL] Debugging deadlocks

2005-03-30 Thread Michael Fuhr
On Wed, Mar 30, 2005 at 10:59:52PM +0200, [EMAIL PROTECTED] wrote: > On Sun, Mar 27, 2005 at 01:37:44AM -0700, Michael Fuhr wrote: > > The current implementation supports only > > exclusive row-level locks (SELECT FOR UPDATE), but I think Alvaro > > might be working on shared

Re: [GENERAL] Postgres mystery

2005-03-29 Thread Michael Fuhr
x27;',''||quote_literal(RECORDNAME.column2)||'')''; One of the operands to || is probably NULL, so the entire INSERT string ends up being NULL. Example: SELECT 'abc' || 'def'; ?column? -- abcdef (1 row) S

Re: [GENERAL] 8.0.2beta1

2005-03-29 Thread Michael Fuhr
t; somebody help me? > > Unfortunately we haven't prepared release notes yet. For the gory details, you could search for "REL8_0_STABLE" in the pgsql-committers archives for the last few months. http://archives.postgresql.org/ -- Michael Fuhr http://www

Re: [GENERAL] Table partition for very large table

2005-03-28 Thread Michael Fuhr
he problem before guessing how to fix it. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: [GENERAL] Merging item codes using referential integrity

2005-03-28 Thread Michael Fuhr
xists, so he gets a duplicate key error. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your mess

Re: [GENERAL] Can't pg_dumpall, claims database exists twice

2005-03-28 Thread Michael Fuhr
datfrozenxid FROM pg_database ORDER BY datname, oid; -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Re: [GENERAL] problem with set autocommit to off

2005-03-28 Thread Michael Fuhr
O OFF is no longer supported Server-side autocommit was removed in 7.4 so now it's just a client-side behavior. In psql you can use "\set AUTOCOMMIT off"; otherwise see the documentation for your client interface. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---

Re: [GENERAL] Linux Filesystem for PG

2005-03-27 Thread Michael Fuhr
2. Unless my memory fails me, it died trying to load the data into > the table. The 7.2 source code appears to have this logic; I don't know if there are any problems with it. "It died" doesn't mean much -- a load could have failed for a number of reasons, so without the e

<    4   5   6   7   8   9   10   11   12   13   >