Re: [GENERAL] Deleting vs foreign keys

2005-10-24 Thread Michael Fuhr
EY); CREATE TABLE bar (fooid integer NOT NULL REFERENCES foo ON DELETE CASCADE); do you have an index on bar.fooid? Also, do you regularly vacuum and analyze the database? -- Michael Fuhr ---(end of broadcast)--- TIP 9: In versions below 8.0, the

Re: [GENERAL] STL problem in stored procedures

2005-10-25 Thread Michael Fuhr
ome C++/C guru could make a thorough analysis of > C++ integration issues. Lots of people use PostGIS, which can be configured to use GEOS, which is a C++ library. You might find useful information in the PostGIS list archives or by asking on one of their lists. http://postgis.refractions

Re: [GENERAL] Select all invalid e-mail addresses

2005-10-25 Thread Michael Fuhr
r zero or more non-@ characters instead of checking against the RFC822/RFC2822 specification. Use a search engine to find a more complete regular expression (beware: it's long). -- Michael Fuhr ---(end of broadcast)--- TIP 9: In versions bel

Re: [GENERAL] Creating table in different database

2005-10-25 Thread Michael Fuhr
be better to use schemas instead of separate databases. -- Michael Fuhr ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your messag

Re: [GENERAL] PostgreSQL vs mySQL, any performance difference for

2005-10-25 Thread Michael Fuhr
(0.00 sec) mysql> insert into test values (123913284723498723423); ERROR 1264 (22003): Out of range value adjusted for column 'i1' at row 1 -- Michael Fuhr ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] Looking for a command to list schemas

2005-10-26 Thread Michael Fuhr
\dn Did not find any relation named "n". You can get the list of schemas by querying the system catalogs: SELECT * FROM pg_namespace; -- Michael Fuhr ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appr

Re: [GENERAL] Error Message

2005-10-26 Thread Michael Fuhr
s original attempt was: > CREATE TRIGGER trig1 AFTER INSERT >ON process FOR EACH ROW > EXECUTE PROCEDURE base(int4); He's given what looks like a function signature instead of passing an argument. Even if this worked, he hasn't specified what argument should be p

Re: [GENERAL] Error Message

2005-10-26 Thread Michael Fuhr
On Wed, Oct 26, 2005 at 07:00:06PM -0600, Michael Fuhr wrote: > You *can* pass arguments to trigger functions but it's done a little > differently than with non-trigger functions. The function must be > defined to take no arguments; it reads the arguments from a context > struct

Re: [GENERAL] Variable return type...

2005-10-26 Thread Michael Fuhr
UNION SELECT 2::integer, 'def'::text; RETURN $1; END; $$ LANGUAGE plpgsql; BEGIN; SELECT foo('curs'); FETCH ALL FROM curs; int4 | text --+-- 1 | abc 2 | def (2 rows) COMMIT; -- Michael Fuhr

Re: [GENERAL] Seq Scan but I think it should be Index Scan

2005-10-26 Thread Michael Fuhr
considering whether to do an index scan. Some people also see performance improvements by lowering random_page_cost, although doing so isn't really correct. BTW, pgsql-performance might be a better list to post performance questions. -- Michael Fuhr ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org

Re: [GENERAL] Error Message

2005-10-26 Thread Michael Fuhr
GER trig1 AFTER INSERT ON process FOR EACH ROW EXECUTE PROCEDURE base(); INSERT INTO process (fluid_id) VALUES (123); INSERT INTO process (fluid_id) VALUES (456); SELECT * FROM process; fluid_id -- 123 456 (2 rows) SELECT * FROM specification;

Re: [GENERAL] Problem with SSL and postgreSQL 8.0.4

2005-10-27 Thread Michael Fuhr
a message > saying that postgresql does not support SSL!! Did you enable ssl in postgresql.conf? -- Michael Fuhr ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMA

Re: [GENERAL] Problem with SSL and postgreSQL 8.0.4

2005-10-27 Thread Michael Fuhr
quot; setting -- uncomment it and change it to "true" or "on", then restart the postmaster. See "Run-time Configuration" in the documentation for more information: http://www.postgresql.org/docs/8.0/interactive/runtime-config.html -- Michael Fuhr ---

Re: [GENERAL] querying while copying into a table and optimizations

2005-10-29 Thread Michael Fuhr
incomplete data acceptable for whatever you're doing? > I am a bit clueless as to what can I do to the configuration files to optimize > this copy. See "Populating a Database" in the "Performance Tips" chapter of the documentation for some ideas. http://www.postg

Re: [GENERAL] How may I keep prepended array items positive?

2005-10-31 Thread Michael Fuhr
tion instead of prepending (aka element-to-array concatenation): test=> SELECT 99 || ARRAY[1, 2, 3]; -- unwanted results ?column? -- [0:3]={99,1,2,3} (1 row) test=> SELECT ARRAY[99] || ARRAY[1, 2, 3]; -- desired results ?column? {99,1,2,3} (1 r

Re: [GENERAL] How may I keep prepended array items positive?

2005-10-31 Thread Michael Fuhr
es to the right so I'd have > [1:4]{1,1,2,3} > > I don't have a pgsql on this box to show output.. If the example above doesn't help then please post the actual commands and output that show the problem. -- Michael Fuhr ---(end of broad

Re: [GENERAL] after insert or update or delete of col2

2005-11-01 Thread Michael Fuhr
erts and deletes? I don't see those behaviors defined in SQL:2003: ::= INSERT | DELETE | UPDATE [ OF ] What, if anything, is different between "AFTER INSERT OF COL2" and a simple "AFTER INSERT"? -- Michael Fuhr ---(end of broadc

Re: [GENERAL] Dumb Questions - upgrade notes?

2005-11-01 Thread Michael Fuhr
I can't seem to find them... See the Release Notes. http://developer.postgresql.org/docs/postgres/release.html -- Michael Fuhr ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe

Re: [GENERAL] Linking

2005-11-01 Thread Michael Fuhr
Could you provide an example of what you're doing to get this error? -- Michael Fuhr ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match

Re: [GENERAL] md5 hash on table row

2005-11-02 Thread Michael Fuhr
b1cbe3d5ed304f31da57b85258f20c8f (1 row) -- Michael Fuhr ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] md5 hash on table row

2005-11-02 Thread Michael Fuhr
On Wed, Nov 02, 2005 at 09:35:33AM -0700, Michael Fuhr wrote: > test=> SELECT id, md5(textin(record_out(foo))) FROM foo; > id | md5 > +-- > 1 | b1cbe3d5ed304f31da57b85258f20c8f I just noticed that record_out(foo

Re: [GENERAL] md5 hash on table row

2005-11-02 Thread Michael Fuhr
On Wed, Nov 02, 2005 at 02:49:57PM -0200, Jon Lapham wrote: > Michael Fuhr wrote: > >test=> SELECT id, foo FROM foo; > > id | foo > >+- > > 1 | (1,123

Re: [GENERAL] md5 hash on table row

2005-11-02 Thread Michael Fuhr
On Wed, Nov 02, 2005 at 12:18:15PM -0500, Tom Lane wrote: > Michael Fuhr <[EMAIL PROTECTED]> writes: > > I just noticed that record_out(foo) works only in 8.1. When I have > > more time I'll see if it's possible in earlier versions. > > Probably not :-( T

Re: [GENERAL] md5 hash on table row

2005-11-02 Thread Michael Fuhr
On Wed, Nov 02, 2005 at 06:07:45PM +0100, A. Kretschmer wrote: > am 02.11.2005, um 9:35:33 -0700 mailte Michael Fuhr folgendes: > > test=> SELECT id, md5(textin(record_out(foo))) FROM foo; > > is 'record_out()' new in 8.1? The signature has changed over time:

Re: [GENERAL] Problem with array in plpgsql function .. please help :-)

2005-11-03 Thread Michael Fuhr
Why are you quoting the value inside the quotes? That is, is there a reason you're using '{\'1734\'}' instead of '{1734}'? Does using the latter work? It does for me in simple tests. -- Michael Fuhr ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] Looping through arrays

2005-11-03 Thread Michael Fuhr
VOLATILE STRICT; SELECT splitinsert('AA-BB-CC-DD', '-'); SELECT * FROM foo; id | val +- 1 | AA 2 | BB 3 | CC 4 | DD (4 rows) -- Michael Fuhr ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner

Re: [GENERAL] PostgreSQL now() function returns incorrect time

2005-11-09 Thread Michael Fuhr
the following? SET timezone TO 'Brazil/East'; SELECT now(); If so then change the timezone line in postgresql.conf to: timezone = Brazil/East Then reload or restart the database. -- Michael Fuhr ---(end of broadcast)--- TIP 9: In vers

Re: [GENERAL] Where Statement

2005-11-09 Thread Michael Fuhr
op it without doing anything? Or does the actual code do something before the drop? -- Michael Fuhr ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] Hanging creating of function

2005-11-09 Thread Michael Fuhr
BSD 6.0/i386 and Solaris 9/sparc. What client are you using? If not psql, have you tried with psql? What platform are you on? -- Michael Fuhr ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subs

Re: [GENERAL] TRUNCATE Question

2005-11-09 Thread Michael Fuhr
se contents are deleted on a periodic basis, consider doing it with TRUNCATE rather than using DELETE followed by VACUUM. TRUNCATE removes the entire content of the table immediately, without requiring a subsequent VACUUM or VACUUM FULL to reclaim the now-unused disk space."

Re: [GENERAL] Hanging creating of function

2005-11-10 Thread Michael Fuhr
one way always fail and the other way always succeed? When the create hangs, if you query pg_locks in another session does it show any locks where granted is false? Do you see any unusual messages in the server's logs? -- Michael Fuhr ---(end of broadcast)--

Re: [GENERAL] Where Statement

2005-11-10 Thread Michael Fuhr
tical situation in an empty database, and all INSERT, SELECT, etc., statements that lead to the results you're seeing. It would also be useful to see the actual output you're getting, along with an explanation of how it differs from what you were expecting. -- Michael Fuhr ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] TIMESTAMP vs TIMESTAMP WITHOUT TIME ZONE

2005-11-10 Thread Michael Fuhr
id | ts + 1 | 2005-11-11 18:00:00+09 (1 row) SELECT * FROM foo WHERE mydate(ts) = '2005-11-11'; id | ts + (0 rows) SET enable_indexscan TO off; SELECT * FROM foo WHERE mydate(ts) = '2005-11-11'; id |

Re: [GENERAL] Very slow queries on 8.1

2005-11-17 Thread Michael Fuhr
memory. How volatile is the data and how common are queries based on signum? You might benefit from clustering on the signum index. > (If necessary, I can write an entire script that creates and populates a > table and then give my performance on that sample for someone

Re: [GENERAL] Implementing rounding rule in plpgsql

2005-11-20 Thread Michael Fuhr
.23456789); INFO: [1] = 1 INFO: [2] = . INFO: [3] = 2 INFO: [4] = 3 INFO: [5] = 4 INFO: [6] = 5 INFO: [7] = 6 INFO: [8] = 7 INFO: [9] = 8 INFO: [10] = 9 myround 1.23456789 (1 row) -- Michael Fuhr ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] Implementing rounding rule in plpgsql

2005-11-20 Thread Michael Fuhr
On Sun, Nov 20, 2005 at 02:24:20AM -0700, Michael Fuhr wrote: > On Sun, Nov 20, 2005 at 02:01:02AM -0500, jeff sacksteder wrote: > > Due to application requirements, I need to implement a rounding function > > that is independant of the baked-in rounding functionality. I'd pr

Re: [GENERAL] Weird results when using schemas

2005-11-20 Thread Michael Fuhr
r +++-+----+-- 2 | bodrum | Bodrum | bodrum | 2005-11-21 00:03:53.786452 |0 (1 row) -- Michael Fuhr ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org

Re: [GENERAL] Multi-parameter aggregates.

2005-11-21 Thread Michael Fuhr
covar_accum, FINALFUNC = covar_final, STYPE = covar_state, INITCOND = '(...)' ); -- Michael Fuhr ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: [GENERAL] Anomalies with the now() function

2005-11-21 Thread Michael Fuhr
ds > but we found sometimes t2 < t1!.. > > The query is done through odbc ( I think that might be additionally causing > some strange behaviour?).. > > What do you think? -- Michael Fuhr ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] column names in select don't exists in insert to

2006-09-20 Thread Michael Fuhr
(field2, field1) values (1, 2); > > It complains that field1 doesn't exists. I can't reproduce this problem; could you post a complete test case? Do you see the problem if you execute the same statements in psql? -- Michael Fuhr ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] powerset?

2006-09-23 Thread Michael Fuhr
; id | powerset2 + 1 | {} 1 | {1} 1 | {2} 1 | {1,2} 2 | {} 2 | {10} 2 | {20} 2 | {10,20} 2 | {30} 2 | {10,30} 2 | {20,30} 2 | {10,20,30} (12 rows) Will that work for you? -- Michael Fuhr ---(end of broadcast)---

Re: [GENERAL] powerset?

2006-09-24 Thread Michael Fuhr
On Sat, Sep 23, 2006 at 11:47:59PM -0600, Michael Fuhr wrote: > FOR i IN 0 .. (1 << (aupper - alower + 1)) - 1 LOOP To handle empty arrays this should be: FOR i IN 0 .. COALESCE((1 << (aupper - alower + 1)) - 1, 0) LOOP -- Michael Fuhr ---(e

Re: [GENERAL] how much free space in tables and index ?

2006-09-24 Thread Michael Fuhr
On Fri, Sep 22, 2006 at 02:11:40AM -0700, [EMAIL PROTECTED] wrote: > When tuples are deleted, there remains free space in table and index > files. > Is it possible to know for each table and index how much free space it > contains ? For tables see the contrib/pgstattuple module. --

Re: [GENERAL] column names in select don't exists in insert to

2006-09-24 Thread Michael Fuhr
e problem is? If the problem still exists then please post a simple but complete test case, including the exact error message you're getting. -- Michael Fuhr ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore

Re: [GENERAL] in failed sql transaction

2006-09-24 Thread Michael Fuhr
on so the transaction can continue after an error. -- Michael Fuhr ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org

Re: [GENERAL] PL/SQL: function call like $1($2)

2006-10-09 Thread Michael Fuhr
nctions or perhaps array_to_string(). stmt := 'SELECT ' || quote_ident(f) || '(' || quote_literal(textin(array_out(p))) || ')'; EXECUTE stmt INTO res; -- Michael Fuhr ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] time type strange behaviour

2006-10-14 Thread Michael Fuhr
. What versions of those things are you using? Might the unexpected results be coming from one of those components? If you connect to the database with psql and issue a query from there, what do you get? -- Michael Fuhr ---(end of broadcast)---

Re: [GENERAL] BEGIN WORK READ ONLY;

2006-10-14 Thread Michael Fuhr
still have to remember to do it. When the intent is to prevent "oops" mistakes rather than to provide real security, using read-only transactions can be convenient. -- Michael Fuhr ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] BEGIN WORK READ ONLY;

2006-10-14 Thread Michael Fuhr
AD ONLY, though. > IIRC we let a "read only" transaction create and modify temp tables. Am I missing something then? test=> BEGIN READ ONLY; BEGIN test=> CREATE TEMPORARY TABLE foo (x integer); ERROR: transaction is read-only -- Michael Fuhr ---(end of

Re: [GENERAL] Maximum size of database

2006-10-17 Thread Michael Fuhr
lso, you might get more help on the pgsql-performance list. -- Michael Fuhr ---(end of broadcast)--- TIP 1: 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: [GENERAL] problems installing pg on solaris

2006-10-19 Thread Michael Fuhr
control the configure settings. > gmake[2]: ar: Command not found I don't know where Solaris 10 puts ar but in earlier versions it's in /usr/ccs/bin. Try adding that directory to your PATH. -- Michael Fuhr ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] PostGIS

2006-10-19 Thread Michael Fuhr
t('POINT(12 34)')); distance_sphere - 0 (1 row) If you're getting unexpected behavior then please post a test case to postgis-users. -- Michael Fuhr ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: [GENERAL] Postrgres Sequence Error

2006-10-22 Thread Michael Fuhr
om the sequence and now the sequence is colliding with those values. Is it possible that something is resetting the sequence? Have you enabled statement logging to investigate? -- Michael Fuhr ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] DELETE performance issues

2006-10-29 Thread Michael Fuhr
hat logging I can turn on so I can figure out > what is causing the high load and slow deletes? I can then use that > info to tune the runtime parameters. What non-default settings are you currently using? -- Michael Fuhr ---(end of broadcast)--

Re: [GENERAL] Instead of Triggers

2006-10-29 Thread Michael Fuhr
ttp://www.postgresql.org/docs/8.1/interactive/rules.html -- Michael Fuhr ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org/

Re: [GENERAL] creating a dumpfile from a view

2006-10-30 Thread Michael Fuhr
data. > But you have to use tables with copy, not views. That'll change in 8.2. Here's an item from the Release Notes: * COPY TO can copy the output of an arbitrary SELECT statement -- Michael Fuhr ---(end of broadcast)--- TIP 9: In

Re: [GENERAL] PostGIS

2006-11-03 Thread Michael Fuhr
e accustomed to thinking (latitude longitude) and who therefore create geometries as (Y X). -- Michael Fuhr ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] Geometric Datatypes

2006-11-04 Thread Michael Fuhr
ing about PostgreSQL's native geometry types specifically or are you also interested in how PostGIS is being used? If the latter then see their case studies: http://postgis.refractions.net/documentation/casestudies/ -- Michael Fuhr ---(end of b

Re: [GENERAL] opening a channel between two postgreSQL-servers?

2006-11-04 Thread Michael Fuhr
in one of those languages can do anything a standalone application could do, such as connecting to another database, even a different DBMS (you could connect from PostgreSQL to MySQL, Oracle, SQL Server, etc.). -- Michael Fuhr ---(end of broadcast)--

Re: [GENERAL] Timeout Value on network error

2006-11-04 Thread Michael Fuhr
will soon be re-established. > Is there a timeout value that we can configure, so all PQ* functions > return consistently? You could use asynchronous command processing with poll() or select(). http://www.postgresql.org/docs/8.1/interactive/libpq-async.html -- Michael Fuhr ---

Re: [GENERAL] ERROR: type "i" does not exist

2006-11-14 Thread Michael Fuhr
ror Reporting and Logging" in the documentation for information about logging. One way to identify the offending query would be to set log_min_error_statement = error in postgresql.conf and reload the server. http://www.postgresql.org/docs/8.1/interactive/runtime-config-logging.

Re: [GENERAL] resetting sequence to cur max value

2006-12-12 Thread Michael Fuhr
FROM foo)); setval 3 (1 row) test=> INSERT INTO foo (t) VALUES ('four'); INSERT 0 1 test=> SELECT * FROM foo; id | t +--- 1 | one 2 | two 3 | three 4 | four (4 rows) -- Michael Fuhr ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] psql script error handling

2006-12-29 Thread Michael Fuhr
xing the problem rather than trying to work around it. You might just need to set client_encoding or convert the data to the server's encoding. -- Michael Fuhr ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org/

Re: [GENERAL] Remove diacritical marks in SQL

2007-01-14 Thread Michael Fuhr
CREATE FUNCTION unaccent(string text) RETURNS text AS $$ use Unicode::Normalize; my $nfd_string = NFD($_[0]); $nfd_string =~ s/[\p{Mn}\p{Me}]//g; return NFC($nfd_string); $$ LANGUAGE plperlu IMMUTABLE STRICT; SELECT unaccent('ěščřžýáíé'); unaccent --- escrzyaie (1 row) -- Michael Fuhr ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] Export to shape file

2007-01-14 Thread Michael Fuhr
out authentication (adjust the following links for whatever version of PostgreSQL you're running). http://www.postgresql.org/docs/8.2/interactive/client-authentication.html http://www.postgresql.org/docs/8.2/interactive/libpq.html -- Michael Fuhr ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] Spam from EnterpriseDB?

2007-01-18 Thread Michael Fuhr
email to my personal address has not gone unremarked. -- Michael Fuhr ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] Spam from EnterpriseDB?

2007-01-19 Thread Michael Fuhr
On Thu, Jan 18, 2007 at 08:02:58PM -0700, Michael Fuhr wrote: > On Thu, Jan 18, 2007 at 06:14:23PM -0800, Joshua D. Drake wrote: > > http://www.commandprompt.com/ :) We are more cost effective and have > > been doing it for much, much longer ;) > > As somebody with a meas

Re: [GENERAL] can't CREATE TRIGGER

2007-01-21 Thread Michael Fuhr
that is. Make sure your applications don't keep transactions open longer than necessary. -- Michael Fuhr ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] triggers and TriggerData

2007-01-22 Thread Michael Fuhr
http://www.postgresql.org/docs/8.2/interactive/sql-createtrigger.html http://www.postgresql.org/docs/8.2/interactive/plpgsql-trigger.html http://www.postgresql.org/docs/8.2/interactive/trigger-interface.html (These links are to the 8.2 documentation but earlier versions also support arguments to trigger

Re: [GENERAL] Postgresql 8.1: plperl code works with LATIN1, fails with UTF8

2007-01-27 Thread Michael Fuhr
de to 8.2 then you might be able to work around the problem by creating the function as plperlu and adding 'use utf8;'. -- Michael Fuhr ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] encode, lower and 0x8a

2007-01-27 Thread Michael Fuhr
ugh it's text? Do you want the end result to be text with escape sequences or do you want to convert it back to bytea? Something like this might work: SELECT lower(textin(byteaout(bytes))) FROM mytable; To turn the result back into bytea: SELECT decode(lower(textin(byteaout(bytes))), 'e

Re: [GENERAL] MULE_INTERNAL translation to win1250

2007-01-28 Thread Michael Fuhr
;t have mappings in win1250; hence the conversion error when the client tries to read the data. Just a guess. -- Michael Fuhr ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] MULE_INTERNAL translation to win1250

2007-01-28 Thread Michael Fuhr
On Sun, Jan 28, 2007 at 07:27:12PM -0700, Michael Fuhr wrote: > I wonder if the OP is doing something like this: [...] > test=> INSERT INTO test VALUES (E'\202\232'); -- \202=0x82, \232=0x9a Another possibility, perhaps more likely, is that some connection didn't set cl

Re: [GENERAL] Postgresql 8.1: plperl code works with LATIN1, fail

2007-01-29 Thread Michael Fuhr
ng explicit conversions? I think the goal is not to have to do so, i.e., to have PL/Perl treat string literals as UTF-8 if the database encoding is UTF-8. PostgreSQL 8.2 does so but earlier versions don't. -- Michael Fuhr ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: [GENERAL] encode, lower and 0x8a

2007-01-29 Thread Michael Fuhr
On Mon, Jan 29, 2007 at 12:52:33PM -0500, Michael Artz wrote: > On 1/27/07, Michael Fuhr <[EMAIL PROTECTED]> wrote: > >SELECT decode(lower(textin(byteaout(bytes))), 'escape') FROM mytable; > > That seems to work correctly, however I missed the functions texti

Re: [GENERAL] temp tables in functions?

2007-02-08 Thread Michael Fuhr
the above yields a syntax error. Also, EXECUTE isn't necessary for the CREATE TABLE statement, although as Bruno mentioned EXECUTE will be necessary for other statements due to plan caching. And ON COMMIT DROP won't help if you call the function multiple times in the same transaction. --

Re: [GENERAL] Move data between two databases SQL-ASCII to UTF8

2007-02-08 Thread Michael Fuhr
encoding to whatever encoding the data is really in; likely guesses for Western European languages are LATIN1, LATIN9, or perhaps WIN1252. -- Michael Fuhr ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate

Re: [GENERAL] line folding versus shop line

2007-02-11 Thread Michael Fuhr
set to "less"? -- Michael Fuhr ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org/

Re: [GENERAL] User privilege information.

2007-02-15 Thread Michael Fuhr
cs/8.2/interactive/functions-info.html#FUNCTIONS-INFO-ACCESS-TABLE http://www.postgresql.org/docs/8.2/interactive/catalogs.html -- Michael Fuhr ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] Is it possible to compress a table any further?

2007-02-16 Thread Michael Fuhr
are you vacuuming the table? Does it receive a lot of updates and/or deletes? Have you done a full-database VACUUM VERBOSE to see if your free space map settings need to be adjusted? What version of PostgreSQL are you running? -- Michael Fuhr ---(end of broadcast)-

Re: [GENERAL] [ANNOUNCE] Advisory on possibly insecure security definer functions

2007-02-17 Thread Michael Fuhr
then search_path wouldn't be reset unless you catch exceptions and reset the path in the exception-handling code. -- Michael Fuhr ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] encoding problem at restore

2007-02-18 Thread Michael Fuhr
1252 (especially the latter if the data originated on Windows). Alternatively, you could use a converter like iconv or uconv to convert the file to UTF-8 before feeding it to psql. -- Michael Fuhr ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] postgresql vs mysql

2007-02-21 Thread Michael Fuhr
---+ | Warning | 1265 | Data truncated for column 'td' at row 1 | +-+--+-+ 1 row in set (0.00 sec) Not as good as "ERROR: hey bonehead, there ain't no such date" but at least it's s

Re: [GENERAL] postgresql vs mysql

2007-02-21 Thread Michael Fuhr
On Wed, Feb 21, 2007 at 01:45:08PM -0600, Ron Johnson wrote: > On 02/21/07 08:42, Michael Fuhr wrote: > > Not as good as "ERROR: hey bonehead, there ain't no such date" but > > But it *inserts the "data"*! I didn't say otherwise and I'm not

Re: [GENERAL] How can you tell if a function is immutable from psql?

2007-02-21 Thread Michael Fuhr
active/catalog-pg-proc.html -- Michael Fuhr ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: [GENERAL] server closed unexpectedly while executing a function

2007-02-23 Thread Michael Fuhr
he rest Do the database logs of the server you're connecting to show what might be wrong? Have you used any of DBI's tracing options (see TRACING in the DBI manual page)? Does a standalone Perl script fail the same way? I'd suggest making sure the code works in a standalone scrip

Re: [GENERAL] some tables unicode, some ascii?

2007-02-24 Thread Michael Fuhr
with Unicode on "like '123%' " queries. See "Operator Classes" in the "Indexes" chapter of the documentation. http://www.postgresql.org/docs/8.2/interactive/indexes-opclass.html -- Michael Fuhr ---(end of broadcast)---

Re: [GENERAL] Unable to restore dump due to client encoding issues -- or, when is SQL_ASCII really UTF8

2007-02-27 Thread Michael Fuhr
bly because the database is UTF8 (see above). Either create the database as SQL_ASCII (see createdb's -E option) or change the client_encoding setting in the dump to whatever the encoding really is (probably LATIN1 or WIN1252 for Western European languages). -- Michael Fuhr ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] Unable to restore dump due to client encoding issues -- or, when is SQL_ASCII really UTF8

2007-02-27 Thread Michael Fuhr
se encoding would mean that all string data would have to be checked and possibly converted. Doing that on a large running system would be problematic; it would probably be just as easy to dump and restore the entire database. -- Michael Fuhr ---(end of broadcast)---

Re: [GENERAL] Solaris and Ident

2007-03-10 Thread Michael Fuhr
27;~/.pgpass'? Set the PGPASSFILE environment variable. Also, make sure group and world have no permissions on the file. http://www.postgresql.org/docs/8.2/interactive/libpq-pgpass.html http://www.postgresql.org/docs/8.2/interactive/libpq-envars.html -- Michael Fuhr -

Re: [GENERAL] DBD::Pg/perl question, kind of...

2007-03-12 Thread Michael Fuhr
en an explicit CLOSE command is issued on it, or the session ends. In the current implementation, the rows represented by a held cursor are copied into a temporary file or memory area so that they remain available for subsequent transactions." -- Michael Fuhr -

Re: [GENERAL] Incorrect "ERROR: database "xxx" is being accessed by other users"

2007-03-13 Thread Michael Fuhr
red *statements*; you have a prepared *transaction*. Connect to the database you're trying to drop and use ROLLBACK PREPARED or COMMIT PREPARED, then disconnect from that database and try dropping it again. -- Michael Fuhr ---(end of broadcast)-

Re: [GENERAL] Exception handling in plperl

2007-03-13 Thread Michael Fuhr
nderstood what you're asking then please provide more information about what you're trying to do. -- Michael Fuhr ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org/

Re: [GENERAL] CHAR data type

2007-03-21 Thread Michael Fuhr
ith rapid access to the shorter column values." See also the TOAST documentation: http://www.postgresql.org/docs/8.2/interactive/storage-toast.html -- Michael Fuhr ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org/

Re: [GENERAL] Query not using index pgsql 8.2.3

2007-03-23 Thread Michael Fuhr
f so then you might try increasing the statistics target for tbl_file.fk_filetype_id and perhaps some of the columns in the join conditions. -- Michael Fuhr ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate

Re: [GENERAL] Query not using index pgsql 8.2.3

2007-03-23 Thread Michael Fuhr
On Fri, Mar 23, 2007 at 12:41:58PM +0100, Henrik Zagerholm wrote: > 23 mar 2007 kl. 12:33 skrev Michael Fuhr: > >The row count estimate for fk_filetype_id = 83 is high by an order > >of magnitude: > > > >>Bitmap Index Scan on tbl_file_idx6 (cost=0.00..25.65 rows=

Re: [GENERAL] Query not using index pgsql 8.2.3

2007-03-23 Thread Michael Fuhr
od starting point: http://www.powerpostgresql.com/PerfList If you have additional performance-related questions then consider posting to pgsql-performance. -- Michael Fuhr ---(end of broadcast)--- TIP 4: Have you searched our list archiv

Re: [GENERAL] How can I select a comment on a column?

2007-03-26 Thread Michael Fuhr
tes: \set ECHO_HIDDEN \d+ mytab -- Michael Fuhr ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] Strange result using transactions

2007-03-27 Thread Michael Fuhr
ccess due to concurrent update"). T2 still doesn't know about the row that T1 inserted but now T2 knows that something happened to the version of the row it was trying to delete. -- Michael Fuhr ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] Print database name

2007-04-05 Thread Michael Fuhr
2/interactive/functions-info.html -- Michael Fuhr ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

<    1   2   3   4   5   6   7   8   9   10   >