[GENERAL] Array comparison & prefix search

2009-12-04 Thread Denes Daniel
x27; <= NULL) is NULL? In fact, ('string' <= NULL) is NULL if I test it directly, or use row-wise comparison, but when I use array comparison, NULL is greather than 'string'. SELECT 'string' <= NULL::text, ARRAY['string'] <= ARRAY[NULL::text]; This gives me a NULL and a TRUE. Why? Can I rely on this? If I can't, is there another way to make the array prefix search use the index? Regards, Denes Daniel

Re: [GENERAL] Array comparison & prefix search

2009-12-04 Thread Denes Daniel
using an ARRAY[], and the other way when using ROW()? SELECT ARRAY['abc', 'string', 'z'] < ARRAY['abc', NULL::text, 'a']; --> returns TRUE SELECT ROW('abc', 'string', 'z') < ROW('abc', NULL::text, 'a'); --> returns NULL Regards, Denes Daniel

Re: [GENERAL] Array comparison & prefix search

2009-12-05 Thread Denes Daniel
I was sure I've read this part of the docs a hundred times, so I've gone after why I didn't find this before: this note is new in the 8.4 docs, it wasn't there before (and I'm using 8.3). http://www.postgresql.org/docs/8.3/static/functions-comparisons.html#ROW-WISE-COMPARISON But I'm pretty sure now that I can rely on this. Thanks, Denes Daniel

Re: [GENERAL] Array comparison & prefix search

2009-12-05 Thread Denes Daniel
le. Yes, I also think that an array prefix equality operator would be good to have... but now that I've found it in the documentation that this solution can be relied on (see my other mail), I can work around the lack of that. Thanks, Denes Daniel

Re: [GENERAL] Error_startup postgresql server

2009-12-07 Thread Daniel Verite
, if it doesn't exist what is the value of the unix_socket_directory parameter in postgresql.conf, or what port postgres is configured to listen to (also in postgresql.conf). If they're non-standard you need pass additional options to the createuser command. Best regards, -- Daniel PostgreSQL

Re: [GENERAL] Array comparison & prefix search

2009-12-10 Thread Denes Daniel
ETWEEN ARRAY['foo', 'bar'] AND ARRAY['foo', 'bar', NULL]" approach works really fast (uses the index), and selects all arrays that are equal to or start with ['foo', 'bar']. Thanks everybody, Denes Daniel 2009/12/7 Sam Mason >

[GENERAL] order of trigger firing relative to column/table constraints

2009-12-17 Thread Daniel Popowich
I am designing a DB where column/table constraints are not sufficient for data integrity (e.g., guaranteeing non-recursive tree graphs) so I'm writing my first complicated triggers and I have been searching docs and archives of this list for detailed information on when triggers are fired relative

Re: [GENERAL] set-level update fails with unique constraint violation

2010-01-04 Thread Daniel Verite
end. Best regards, -- Daniel PostgreSQL-powered mail user agent and storage: http://www.manitou-mail.org -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Question on how to conditionally commit or rollback a sql-request

2010-01-04 Thread Daniel Verite
to do the desired check It's not possible to commit or rollback inside a function. Instead of issuing a rollback, you could raise an exception, and instead of doing a commit, you should do nothing at all. Best regards, -- Daniel PostgreSQL-powered mail user agent and storage: http://www.man

Re: [GENERAL] set-level update fails with unique constraint violation

2010-01-06 Thread Daniel Verite
will be checked immediately after every command "after every command" seems to describe behavior #2, not #1. Best regards, -- Daniel PostgreSQL-powered mail user agent and storage: http://www.manitou-mail.org -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To ma

Re: [GENERAL] set-level update fails with unique constraint violation

2010-01-09 Thread Daniel Verite
Tom Lane wrote: > "Daniel Verite" writes: > > But still I wonder why there is that difference in behavior between NON > > DEFERRABLE and DEFERRABLE INITIALLY IMMEDIATE, when the unique constraint > > doesn't get deferred by using SET CONSTRAINTS. >

[GENERAL] crosstab function - pivot - use column value as column description

2010-01-12 Thread Daniel Schuchardt
25737 |farbe | Blau 14725737 |gewicht | 100 kg > material | farbe | gewicht --+-+ alu sorte 1|blau | 100kg > the number of columns depends on data. is there is a simple solution for that? -- Daniel Schuchardt /Softwareentwicklung/ /http://www.pr

Re: [GENERAL] crosstab function - pivot - use column value as column description

2010-01-12 Thread Daniel Schuchardt
See bottom. Am 12.01.2010 22:00, schrieb Merlin Moncure: On Tue, Jan 12, 2010 at 3:27 PM, Daniel Schuchardt wrote: Hy, i'm looking for a solution to get this table dynamicaly in that resultset: SELECT r_dbrid, r_kategorie AS column_name, r_descr AS value FROM recnokeyword WHERE r_

[GENERAL] postgresql 8.1 windows 2008 64 bit

2010-01-13 Thread Daniel Schuchardt
Hy, can anybody give us a hint if we can use that combination? Thanks, Daniel. -- Daniel Schuchardt /Softwareentwicklung/ /http://www.prodat-sql.de/ -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org

Re: [GENERAL] postgresql 8.1 windows 2008 64 bit

2010-01-13 Thread Daniel Schuchardt
Am 13.01.2010 16:00, schrieb Craig Ringer: On 13/01/2010 6:15 PM, Daniel Schuchardt wrote: Hy, can anybody give us a hint if we can use that combination? You can use libpq on 64-bit windows to talk to an 8.1 database if you really must. I really wouldn't recommend running the 8.1 dat

Re: [GENERAL] postgresql 8.1 windows 2008 64 bit

2010-01-13 Thread Daniel Schuchardt
just fine on 64bit Windows. Just understand that PostgreSQL will be running in 32bit mode, which frankly on windows is not a problem compared to other platforms. Joshua D. Drake -- Mit freundlichen Grüssen, Daniel Schuchardt /Softwareentwicklung/ *CIMPCS GmbH *Grünewaldstrasse 19 D-99

Re: Fwd: [GENERAL] [LibPQ] Trying PQconnectStart: it doesn't seem to connect

2010-01-24 Thread Daniel Verite
Alessandro Agosto wrote: > I'm not yet within select/poll cycle, this is the first call that should > return CONNECTION_OK or CONNECTION_BAD (refering to docs). That would be the behavior of PQconnectdb(), not PQconnectStart(). Have you read that part of the doc: Other states might als

[GENERAL] JOIN Record returning Function

2010-02-02 Thread Daniel Schuchardt
r. But does anyone know a tricky solution for that problem? -- Daniel Schuchardt /Softwareentwicklung/ /http://www.prodat-sql.de/

Re: [GENERAL] No tables in postgres and template db

2010-02-16 Thread Daniel Verite
pears It's a pager issue. A simple way to avoid it is to have the LESS environment variable set to -X More info at http://www.shallowsky.com/linux/noaltscreen.html Best regards, -- Daniel PostgreSQL-powered mail user agent and storage: http://www.manitou-mail.org -- Sent via pgsql-general

Re: [GENERAL] "make check" failed on 8.4.2 install

2010-02-24 Thread Daniel Verite
ant to use that as your default compiler. Debian 4 comes with gcc-4.1, which is what you should get when you install the package named gcc. Best regards, -- Daniel PostgreSQL-powered mail user agent and storage: http://www.manitou-mail.org -- Sent via pgsql-general mailing list (pgsql-general@

Re: [GENERAL] Cast char to number

2010-02-24 Thread Daniel Verite
it's not numeric). Best regards, -- Daniel PostgreSQL-powered mail user agent and storage: http://www.manitou-mail.org -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Can not match 0 on bytea

2010-02-27 Thread Daniel Verite
\000%' from table1; selection position(E'\\000'::bytea in c1) from table1; The value is 0 when there is no match and >0 otherwise. Best regards, -- Daniel PostgreSQL-powered mail user agent and storage: http://www.manitou-mail.org -- Sent via pgsql-general mailing li

Re: [GENERAL] Restrict allowed database names?

2010-03-21 Thread Daniel Verite
Sergey Konoplev wrote: > What about PL/pgSQL wrapper function for CREATE DATABASE with database > name check and SECURITY DEFINER option. Not possible because CREATE DATABASE can't be executed within a function (nor within a transaction). Best regards, -- Daniel Postgre

Re: [GENERAL] [BUGS] BUG #6325: Useless Index updates

2011-12-06 Thread Daniel Migowski
uld be a good thing to always check if the inputs to the function have changed, before calling this function once or twice. Since I have a lot of functional indexes, I would greatly profit from an improvement in this area. Is anyone interested in implementing this? Regards, Daniel

[GENERAL] Feature Request: Better handling of foreign keys in DELETE statements

2011-12-19 Thread Daniel Migowski
omagically be excluded from my delete statement. When this keyword is given, no FK checks have to be done, because FK referenciality cannot be violated anyway. DELETE UNREFERENCED FROM address WHERE ...; Thanks for your time and this great database product. Regards, Daniel Migowski

[GENERAL] pg_restore should restore the schema comments and the database properties

2011-12-20 Thread Daniel Migowski
automatically, but I don't want to wish for too much here. Thank you very much in advance, Daniel Migowski IKOffice UNTERNEHMENSSOFTWARE IKOffice GmbH Daniel Migowski Mail: dmigow...@ikoffice.de<mailto:dmigow...@ikoffice.de> Nordstrasse 10 Tel.: +49 (0)441 21 98 89 52 26135 Oldenburg

[GENERAL] Operator based on data type

2012-01-12 Thread Daniel McGreal
Good day! I started off writing a question to this list, but in so doing I thought of a solution! :) So, I'll try and record the result, in case anyone else finds themselves in this unfortunate situation or has suggestions for improvements (especially any regarding query performance). My system g

[GENERAL] Operator based on data type

2012-01-12 Thread Daniel McGreal
Good day! I started off writing a question to this list, but in so doing I thought of a solution! :) So, I'll try and record the result, in case anyone else finds themselves in this unfortunate situation or has suggestions for improvements (especially any regarding query performance). My system g

[GENERAL] Full Text Search, avoiding lexemes search

2012-01-27 Thread Daniel Vázquez
Hi guys! Full text search, searches by lexemes, this minds that if you are finding for "gato" word you are really finding for {gat} lexeme. I you construct vectors for the words "gato", "gatos", "gata", "gatas", all have the same lexema {gat} Then the search "gato" that is to say the search {gat}

[GENERAL] Full Text Search, avoiding lexemes search

2012-01-27 Thread Daniel Vázquez
Hi guys! Full text search, searches by lexemes, this minds that if you are finding for "gato" word you are really finding for {gat} lexeme. I you construct vectors for the words "gato", "gatos", "gata", "gatas", all have the same lexema {gat} Then the search "gato" that is to say the search {gat}

[GENERAL] initdb $PGDATA not working

2012-02-09 Thread Daniel Vázquez
Hi! I've set my PGDATA variable in profile export PGDATA=/home/mydata/pgsql/data Testing variable for correct set in enviroment $ echo $PGDATA /home/mydata/pgsql/data but when execute: $ sudo /etc/init.d/postgresql-9.1 initdb or execute: $ sudo /etc/init.d/postgresql-9.1 initdb -D /home/mydata/

Re: [GENERAL] initdb $PGDATA not working

2012-02-09 Thread Daniel Vázquez
THX all !! My fault is I set the $PGDATA enviroment variable in /etc/sysconfig/pgsql/**postgresql like usual in 8.4 renaming the file to postgresql-9.1 solve the isue. Thanks guys! El 9 de febrero de 2012 22:25, Daniel Vázquez escribió: > Hi! > > I've set my PGDATA variable in pr

Re: [GENERAL] MySQL search query is not executing in Postgres DB

2012-02-18 Thread Daniel Neugebauer
On 02/19/2012 12:05 AM, Susanne Ebrecht wrote: > Am 17.02.2012 17:24, schrieb Alban Hertroys: >> On 17 February 2012 17:19, Scott Marlowe >>> Have you tried casting to varchar(1000) or something like that? >> Don't MySQL's varchars only go to 255? That's why every MySQL database >> uses blobs for t

[GENERAL] Unaccent: create new dictionary based template

2012-02-21 Thread Daniel Vázquez
Hi guys! I'want to run unaccent function with a custom unaccent dictionary I know that we can do: Select unaccent('áéíóúñ') Select unaccent('unaccent', 'áéíóúñ') Select unaccent('custom_unaccent', 'áéíóúñ) PG Docs say that we can set the rules for default installed unaccent dictionary: ALTER

Re: [GENERAL] Rails & pg setup question

2012-02-25 Thread Daniel Podlejski
(Rails ORM) >= 3.1 is broken by design: https://github.com/rails/rails/issues/1627 -- Daniel Podlejski -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Mix characters with utf-8 characters on the same query

2012-03-03 Thread Daniel Vázquez
Hi guys! There's a way to mix characters with utf-8 characters on the same query. Some thing like this: Character: "." (dot) UTF-8: *\u002E* (requisite* can't use regex*) For this normal query: select * from foo where email like 'em...@company.com ' Some thing like this: select * from foo w

[GENERAL] Searching email, Full Text Search prefix, not expected results

2012-03-14 Thread Daniel Vázquez
Hi guys, I'm going to crazy about FTS with prefix agains email values on tsvector. Follow how to reproduce: For the next tsvector: =# select to_tsvector('u...@company.com') to_tsvector -- 'u...@company.com':1 I expects TRUE for all next tsqueryes: select to_tsvector('u

Re: [GENERAL] Searching email, Full Text Search prefix, not expected results

2012-03-14 Thread Daniel Vázquez
But tsvector recognices email format as natural. And I'm not looking for a substring. Please see the queries are incremental with the search string, and see last four results ... I think some think it's no working properly. El 14 de marzo de 2012 19:05, Daniel Vázquez escribió: >

Re: [GENERAL] PostgreSQL Trigger and rows updated

2012-03-31 Thread Daniel Verite
: UPDATE hello_cars SET status=new.status WHERE value=value which indeed updates all the rows, not what you want. The fix would be: UPDATE hello_cars SET status=new.status WHERE car_id=NEW.ID; Best regards, -- Daniel PostgreSQL-powered mail user agent and storage: http://www.manitou-mail.

[GENERAL] PL/R install, no pgxs available

2012-04-30 Thread Daniel Cole
issing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wformat-security -fno-strict-aliasing -fwrapv -g CFLAGS_SL = -fpic LDFLAGS = -Wl,-Bsymbolic-functions -Wl,--as-needed -Wl,--as-needed -Wl,--as-needed LDFLAGS_EX = LDFLAGS_SL = LIBS = -lpgport -lxslt -lxml2 -lpam -lssl -lcrypto -lkrb5 -lcom_err -lgssapi_krb5 -lz -ledit -lcrypt -ldl -lm VERSION = PostgreSQL 9.1.3 Please tell me any ideas you have. I am at a stand still on this. Thanks, Daniel --- Daniel Cole

Re: [GENERAL] PL/R install, no pgxs available

2012-05-01 Thread Daniel Cole
Thanks Joe and John, You are right. I all needed was that dev package. On Ubuntu 4.4.3. I ran: sudo apt-get install postgresql-server-dev-9.1 and then ran through the PLR install with no problem. Thanks so much for the help. Daniel

[GENERAL] PLR Help

2012-05-02 Thread Daniel Cole
ile are: /usr/lib/R/bin /usr/lib/R/ /usr/lib/postgresql/9.1/lib/ that last one was just in case that worked. Please can anyone give me an idea how to get PLR running. It is hopefully my last stumbling block before my script that requires R and PLR will run. Thanks, Daniel retunr data from:

Re: [GENERAL] PLR Help

2012-05-02 Thread Daniel Cole
spend a little while looking for lib.R.so and wondering how I could be missing that file.. then I saw your follow-up email. Thanks again, Daniel On Wed, May 2, 2012 at 3:07 PM, Joe Conway wrote: > On 05/02/2012 10:59 AM, Joe Conway wrote: > > First, go find lib.R.so. Assuming it

[GENERAL] Prepared statements performance

2012-05-10 Thread Daniel McGreal
Hi! My reading to date suggests that prepared statements should be faster to execute than issuing the same statement multiple times. However, issuing 100'000 INSERTs turned out to be more than ten times faster than executing the same prepared statement 100'000 times when executed via pgAdmin. The

Re: [GENERAL] Prepared statements performance

2012-05-10 Thread Daniel McGreal
ks, Dan. P.S. Mac OS X 10.7.3 using PostgreSQL 9.1.2. On Thu, May 10, 2012 at 9:25 AM, Daniel McGreal wrote: > >> Hi! >> >> My reading to date suggests that prepared statements should be faster to >> execute than issuing the same statement multiple times. However, issu

Re: [GENERAL] Prepared statements performance

2012-05-10 Thread Daniel McGreal
2012/5/10 Daniel McGreal : > > Hi again, > > > > I did a follow up test using 'multi-value' inserts which is three times > > faster than multiple inserts thusly: > > > > if you need speed, use a COPY statement - it should be 10x faster than > INSERT

Re: [GENERAL] Prepared statements performance

2012-05-10 Thread Daniel McGreal
Doing the same tests from psql gives: 1. ~2.5 seconds for INSERT/VALUES 2. ~10 seconds for prepared statement executes 3. ~15 seconds for multiple INSERTs Dan. On Thu, May 10, 2012 at 3:42 PM, Tom Lane wrote: > Alban Hertroys writes: > > On 10 May 2012 15:05, Radosław Smogura wrote:

[GENERAL] (TSearch2] Chinese dictionary?

2008-12-12 Thread Daniel Chiaramello
steps described, I would still have lacked the most important part: the dictionary files themselves... Has one of you managed to installed a chinese TSearch2 dictionary on Postgres? Thanks for your attention, Daniel Chiaramello

Re: [GENERAL] inconsistency in aliasing

2009-01-14 Thread Daniel Verite
ne, it's not allowed as part of an expression Which looks like the very issue discussed here, and it just behaves as documented. Best regards, -- Daniel PostgreSQL-powered mail user agent and storage: http://www.manitou-mail.org -- Sent via pgsql-general mailing list (p

Re: [GENERAL] inconsistency in aliasing

2009-01-14 Thread Daniel Verite
sel order by score+1; The point is that the subselect makes "score" available as a valid expression to the upper select. Best regards, -- Daniel PostgreSQL-powered mail user agent and storage: http://www.manitou-mail.org -- Sent via pgsql-general mailing list (pgsql-general@postg

Re: [GENERAL] problem converting database to UTF-8

2009-01-22 Thread Daniel Verite
27;s slower but doesn't need much memory, contrary to iconv that indeed seems to want the entire stream in memory before proceeding. Best regards, -- Daniel PostgreSQL-powered mail user agent and storage: http://www.manitou-mail.org -- Sent via pgsql-general mailing list (pgsql-general@pos

Re: [GENERAL] chinese parser for text search !

2009-01-29 Thread Daniel Chiaramello
Hello Oleg and others. I also found that reference, but failed to find the corresponding Chinese dictionary it mentions. And when I tried to compile nlpbamboo, it fails. Has one of you tried (and succeeded) to use Tsearch for Chinese? Thanks for your attention, Daniel Oleg Bartunov a écrit

Re: [GENERAL] Pet Peeves?

2009-01-30 Thread Daniel Verite
oracle.com/technology/pub/articles/oracle-database-11g-top-f eatures/11g-pivot.html In contrast of these clauses, PG's contrib/tablefunc looks more limited and quite harder to use. Best regards, -- Daniel PostgreSQL-powered mail user agent and storage: http://www.manitou-mail.org -- Sent vi

Re: [GENERAL] Pet Peeves?

2009-01-30 Thread Daniel Verite
re the execute stage but in the case of PIVOT they had to be generated by the execute stage, that would lead to an impossible chicken-and-egg situation. Maybe that's the reason. Best regards, -- Daniel PostgreSQL-powered mail user agent and storage: http://www.manitou-mail.org -- Sent

Re: [GENERAL] Fulltext search configuration

2009-02-02 Thread Daniel Chiaramello
TEXTE : ligne 42 du fichier de configuration « /usr/share/pgsql/tsearch_data/ar_utf8.affix » : « PFX Aa Y 40 (which means Bad format of Affix file for flag, line 42 of configuration file) Do you have an error when creating your dictionary? Daniel Mohamed a écrit : I have ran

Re: [GENERAL] LIKE with pattern containing backslash

2009-02-03 Thread Daniel Verite
\'" (8 backslashes) which looks ridiculous but is the correct form. The C compiler will reduce 8 to 4. The SQL parser will reduce 4 to 2. The LIKE operator will reduce 2 to 1. Best regards, -- Daniel PostgreSQL-powered mail user agent and storage: http://www.manitou-mail

Re: [GENERAL] LIKE with pattern containing backslash

2009-02-03 Thread Daniel Verite
ck of an ESCAPE clause to LIKE. Just add it to disable the special role of backslash and the patterns will match as you expect. Best regards, -- Daniel PostgreSQL-powered mail user agent and storage: http://www.manitou-mail.org -- Sent via pgsql-general mailing list (pgsql-general@post

Re: [GENERAL] Killing OIDs

2009-02-11 Thread Daniel Verite
nyway, unless you ask otherwise. See the -o option. Best regards, -- Daniel PostgreSQL-powered mail user agent and storage: http://www.manitou-mail.org -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/

[GENERAL] Format string for ISO-8601 date and time

2009-02-26 Thread Daniel Verite
tions-formatting.html If not, what would be the way to convert a timestamp to such a string regardless of the session's datestyle settings? Thanks, -- Daniel -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.or

Re: [GENERAL] Format string for ISO-8601 date and time

2009-02-26 Thread Daniel Verite
7; from date),'FM00') This form is typically used in datetime fields in xml files, and somehow I was expecting a pre-existing format for it, such as php5's date("c") rather than the complex expression above :) Best regards, -- Daniel -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Format string for ISO-8601 date and time

2009-02-26 Thread Daniel Verite
rary to what its name seems to imply. (Though when I first started with PG some years ago, I sure fell in that trap) Best regards, -- Daniel -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Custom datestyle for timestamps

2009-03-04 Thread Daniel Verite
where the format follows the sames rules than to_char and to_date. This sets an implicit format for every subsequent text<->date conversion. Is there a way I could achieve that with postgres? A psql-only solution would be good enough for me. Thanks, -- Daniel -- Sent via pgsql-gene

Re: [GENERAL] Custom datestyle for timestamps

2009-03-06 Thread Daniel Verite
Peter Eisentraut wrote: On Thursday 05 March 2009 00:19:02 Daniel Verite wrote: > SET DATESTYLE takes predefined keywords such as ISO or US as arguments, > but I can't find a way to specify a custom format string for > timestamps. There is no support for that. >

[GENERAL] using window functions

2009-03-16 Thread Daniel Manesajian
lect avg(my_int) over (order by my_int rows unbounded preceding) order by 1;" I get an error: ERROR: syntax error at or near "over" Do I have to build from source to try window functions? Thank you, Daniel ___

Re: [GENERAL] Escaping special characters

2009-03-17 Thread Daniel Verite
\\& Jones'; ?column? Smith \& Jones (1 row) if ON you don't: test=> set standard_conforming_strings=on; SET test=> select 'Smith \& Jones'; ?column? Smith \& Jones (1 row) ON is supposed to become the default at some

Re: [GENERAL] using window functions

2009-03-17 Thread Daniel Manesajian
hinking my next step would be to build from source by grabbing the next daily snapshot. Is this the thing to do? Regards, Daniel > To: mane...@hotmail.com > CC: pgsql-general@postgresql.org > Subject: Re: [GENERAL] using window functions > Date: Mon, 16 Mar 2009 23:58:25 -0400

Re: [GENERAL] text column constraint, newbie question

2009-03-24 Thread Daniel Verite
LATIN1-encoded strings and is thus unusable on UTF-8 contents. So if you end up talking UTF-8 with the database, you'll probably need to use htmlspecialchars() instead, and UTF-8 as your HTML charset. Best regards, -- Daniel PostgreSQL-powered mail user agent and storage: http://www.manit

Re: [GENERAL] Last modification time of a database?

2009-03-25 Thread Daniel Verite
unately we don't have them yet. The TODO list links that message: http://archives.postgresql.org/pgsql-hackers/2008-03/msg00451.php Best regards, -- Daniel PostgreSQL-powered mail user agent and storage: http://www.manitou-mail.org -- Sent via pgsql-general mailing list (pgsql-general@post

Re: [GENERAL] text column constraint, newbie question

2009-03-25 Thread Daniel Verite
Stephen Cook wrote: Daniel Verite wrote: > Note that htmlentities() expects LATIN1-encoded strings and is thus > unusable on UTF-8 contents. > So if you end up talking UTF-8 with the database, you'll probably need > to use htmlspecialchars() instead, and U

Re: [GENERAL] converting from bytea to integers

2009-04-20 Thread Daniel Verite
an). get_byte()? mailtest=> \set e '\'\12\15\107\20\'::bytea' mailtest=> select get_byte(:e,0),get_byte(:e,1),get_byte(:e,2),get_byte(:e,3); get_byte | get_byte | get_byte | get_byte --+--+--+-- 10 |13 | 71 |

Re: [GENERAL] standard_conforming_strings and pg_escape_string()

2009-04-24 Thread Daniel Verite
, I had expected its behavior to change accordingly: no std strings: x\y --> x\\y with std strings: x\y --> x\y It works for me: $ php -e Output: 5.2.0-8+etch13 toto\\titi toto\titi Best regards, -- Daniel PostgreSQL-powered mail user agent and storage: http://www.manitou-ma

Re: [GENERAL] Sequence Incrementing by 2 insted of 1

2009-04-28 Thread Daniel Verite
ts of business logic as well as some rewrite rules to track field changes. Using 8.3.0. Can anyone think of a reason why? I'd say rewrite rules are your prime suspect. Check out for example: http://archives.postgresql.org/pgsql-sql/2007-03/msg00334.php Cordialement, -- Daniel -- Sent via pgs

Re: [GENERAL] PostgreSQL Hibernate Problem

2009-04-28 Thread Daniel Migowski
. If you are able to, just use lowercase table names in postgres, and your problem is solved. With best regards, Daniel Migowski -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Importing large objects from the client side programatically.

2009-05-01 Thread Daniel Verite
Andrew Maclean wrote: I am using C++ and trying to programatically import a large object from the client side into a server. In that context, the simplest way is to use libpq's C functions: http://www.postgresql.org/docs/8.3/static/lo-interfaces.html Best regards, -- D

Re: [GENERAL] Pgsql errors, DBI and CGI::Carp

2009-05-01 Thread Daniel Verite
^ at dberr.pl line 4. If you run that trivial program in your environment, what output do you get? Best regards, -- Daniel PostgreSQL-powered mail user agent and storage: http://www.manitou-mail.org -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to you

Re: [GENERAL] Re: Mapping output from a SEQUENCE into something non-repeating/colliding but random-looking?

2009-05-02 Thread Daniel Verite
have unsigned integers in PG. If you're OK with getting negative values, the return type can be changed to int. Otherwise if you need a positive result that fits in 32 bits, it's possible to tweak the code to use 15 bits blocks instead of 16, but then the input will have to be less than 2^

Re: [GENERAL] Two Questions Re: Warm Backup

2009-05-02 Thread Daniel Verite
he production schema will be written to the warm standby? For example, if I drop a constraint in production I assume the same will occur on the warm standby. If I create and drop a table in production, I assume it will occur on the warm standby. It will, all DDL is replicated. Best regards, --

Re: [GENERAL] prepared statements and DBD::Pg

2009-05-08 Thread Daniel Verite
example: http://archives.postgresql.org/pgsql-general/2005-11/msg00339.php Best regards, -- Daniel PostgreSQL-powered mail user agent and storage: http://www.manitou-mail.org -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgres

Re: [GENERAL] prepared statements and DBD::Pg

2009-05-08 Thread Daniel Verite
pare aborts the current transaction, so that any subsequent command will fail until a rollback is issued. Falling back to client-side prepare once in this state would probably not help much. Best regards, -- Daniel PostgreSQL-powered mail user agent and storage: http://www.manitou-mail.org -- S

Re: [GENERAL] 8.3: timestamp subtraction

2009-05-23 Thread Daniel Verite
-- t (1 row) test=> select version(); version --- - PostgreSQL 8.3.7 on i486-pc-linux-gnu, compiled by GCC gcc-4.3.real (Ubuntu 4.3.2-1ubuntu11) 4.3.2 (1 row) Best

[GENERAL] [ANNOUNCE] Manitou-Mail

2005-03-25 Thread Daniel Verite
MTA, but the UI runs under windows too (it uses the graphical Qt library), with pre-compiled binaries available. The project has a website with some documentation and download links at http://www.manitou-mail.org and a sourceforge entry: http://sf.net/projects/manitou-mail Bug reports, ideas, help

Re: [GENERAL] Inheritance and such

2005-04-03 Thread Daniel Schuchardt
not called. Same thing with CREATE or DELETE. I have to define the trigger to be AFTER UPDATE ON specialized. Is it normal? Yes, thats known. You have to define a trigger on each child table. You can point that trigger on the same function. Daniel. ---(end of

Re: [GENERAL] lower function

2005-04-06 Thread Daniel Verite
Mage wrote: > teszt=# select keywords_split('AúéöÖÉÁ'); > keywords_split > > aúéöÖÉÁ > (1 row) What happens if you add use locale; in your perl function before calling lc ? -- Daniel PostgreSQL-powered mail user agent and storage: ht

Re: [GENERAL] lower function

2005-04-06 Thread Daniel Verite
Mage wrote: > with use locale;: > > select keywords_split('AúéöÖÉÁ'); > ERROR: creation of Perl function failed: 'require' trapped by operation > mask at (eval 6) line 2. Ah. So maybe it would work with plperlu instead of plperl. -- Daniel PostgreSQL-

Re: [GENERAL] Can't install plpython on Windows 8.0

2005-04-08 Thread Daniel Schuchardt
error Thanks, Steve I have the same problems : C:\Postgres\bin>createlang.exe -d template1 -U root plpythonu createlang: language installation failed: ERROR: could not load library "C:/postgres/lib/plpython.dll": dynamic load error (library exists at this place...) Daniel.

Re: [GENERAL] Can't install plpython on Windows 8.0

2005-04-09 Thread Daniel Schuchardt
http://www.postgresql.org/docs/faq Ok, the missing library is python23.dll. I installed ActivePython23 and now everything works fine. Daniel. ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [GENERAL] grant all privileges to all tables in a database

2005-04-10 Thread Daniel Verite
bles, sequences and whatnot). The > following three commands will grant those privileges, first to the > database, then to the tables, then to the sequences. In this case, why not let 'username' create the database and all its objects so that it will have all privileges on them afterwards

Re: [GENERAL] Encoding Issue with UNICODE

2005-04-10 Thread Daniel Verite
ent databases into > LATIN1 ones? They should be compatible, because all characters I use > are only äöü, which are downward compatible. But then you'll have trouble with your java app if you do that. Java works with unicode strings, so it makes sense to have the db contents in unicod

Re: [GENERAL] psql vs perl prepared inserts

2005-04-13 Thread Daniel Verite
tp://manitou-mail.org/pgstream) that happens to have a unified API for prepared/non-prepared statements. -- Daniel PostgreSQL-powered mail user agent and storage: http://www.manitou-mail.org #include "pgstream.h" #include #include #include #include int main(int argc, char** argv)

[GENERAL] What means Postgres?

2005-04-19 Thread Daniel Schuchardt
Just for fun and interrest. What means Postgres? Where and why this name was born? Daniel ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [GENERAL] What means Postgres?

2005-04-19 Thread Daniel Schuchardt
read http://www.postgresql.org/docs/8.0/interactive/history.html but there it is only clear that Postgres is based in Ingres. But i also don't know what Ingres means. now I know ;-) Daniel ---(end of broadcast)--- TIP 3: if posting/reading through

Re: [GENERAL] Windows install/uninstall as a "service"

2005-04-21 Thread Daniel Schuchardt
suggestions. It seems that you have installed only binarys. So you have to initialize your databasecluster with initdb. Take a look at initdb --help. This will create both, Datadirectory and postgresql.conf files. Daniel ---(end of broadcast)--- TIP 2: you

[GENERAL] Anyone doing a 8.0.2-x86_64-RHEL4.rpm?

2005-05-05 Thread Daniel Browning
8.0.2 but I suffer from acute laziness. Thanks, -- Daniel Browning <[EMAIL PROTECTED]> - Kavod Technologies. Random Fortune: It's ten o'clock; do you know where your processes are? ---(end of broadcast)--- TIP 3: if posting/readin

Re: [GENERAL] Unicode and unaccent()

2005-05-06 Thread Daniel Verite
42\347\350\351\352\364\373', 'aceeeou') > ; END; $$ LANGUAGE plpgsql IMMUTABLE STRICT; > > My problem is that the values like \342 are for LATIN1 type encoding. I Why wouldn't this: RETURN translate($1, 'éçàêè...', 'ecaee...') ; work just

Re: [GENERAL] Adventures in Quest for GUI RAD

2005-05-10 Thread Daniel Schuchardt
". I spend very much time to fix up Zeos-lib. So perhaps we can share. (Last week i fixes a bug with "--" comment style for example; that style of comments wasnt accepted because ZeosLib deleted all #10#13 and so everything was a single line -> everything after "--&qu

[GENERAL] Delphi - Developers start develop Access components for Postgres?

2005-05-10 Thread Daniel Schuchardt
y good solution to access Postgres from Delphi. Perhaps we should start a project at pgfoundry "PostgreSQL - Access for Delphi". Opinions? Daniel. ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [GENERAL] Delphi - Developers start develop Access components for Postgres?

2005-05-10 Thread Daniel Schuchardt
Me not. The problem with lazarus is that they don't support many third party components. We use havily Teechart and Developer Express in our software so Lazarus isn't a choice for us. Daniel Zlatko Matic schrieb: What about Lazarus Has anybody tried working with Lazarus? - Origin

Re: [GENERAL] Delphi - Developers start develop Access components

2005-05-10 Thread Daniel Schuchardt
ems I still would never do a GUI database app with C# or Java when I can do it much faster and easier with Delphi. Hm I think in that way too. But I try to reduce buissines logic in Delphi. Delphi is still the best RAD - Developement tool IMHO. Daniel ---(end of broa

Re: [GENERAL] Delphi - Developers start develop Access components

2005-05-10 Thread Daniel Schuchardt
t() RETURNS SETOF testresulttest AS $$ DECLARE t testresulttest; BEGIN t.id:=1; t.test:='first row'; --or some record data RETURN NEXT t; t.id:=2; t.test:='middle row'; RETURN NEXT t; t.id:=3; t.test:='last row'; RETURN NEXT t; RETURN; END $$ LANGUAGE plpgsql; SELEC

Re: [GENERAL] Delphi 2005, Postgresql, ZEOS & optimistic locking

2005-05-13 Thread Daniel Schuchardt
You could also open a transaction and SELECT FOR UPDATE. So a second transaction can't Select the same data for update. That works fine. (You can try in with pgsql too). Daniel Philippe Lang schrieb: Hi, I've been testing Delphi 2005 with Postgresql 7.4.5, through ZEOS Lib 6.5.1, an

<    1   2   3   4   5   6   7   8   >