Re: [GENERAL] Constraint to ensure value does NOT exist in another table?

2011-06-15 Thread Mike Christensen
>> I know I can setup a FK constraint to make sure Table1.ColA exists in >> Table2.Key, however what if I want to do the reverse? >> >> I want to ensure Table1.ColA does NOT exist in Table2.Key..  Can I do >> this with any sort of CHECK constraint, trigger, custom function, etc? > > > The most comm

Re: [GENERAL] Symbols and versioning of binary releases; running a symbol server

2011-06-15 Thread Magnus Hagander
On Thu, Jun 16, 2011 at 02:52, Craig Ringer wrote: > Hi (EnterpriseDB) folks > > I've been working with someone off list to get some information about a > crash they encounter during a batch run. We're generating a crash dump, but > I'm having some issues getting matching symbols so I can examine

Re: [GENERAL] Constraint to ensure value does NOT exist in another table?

2011-06-15 Thread Simon Riggs
On Thu, Jun 16, 2011 at 6:04 AM, Mike Christensen wrote: > I know I can setup a FK constraint to make sure Table1.ColA exists in > Table2.Key, however what if I want to do the reverse? > > I want to ensure Table1.ColA does NOT exist in Table2.Key..  Can I do > this with any sort of CHECK constrai

Re: [GENERAL] You could be a PostgreSQL Patch Reviewer!

2011-06-15 Thread Mike Christensen
On Wed, Jun 15, 2011 at 10:34 PM, Tom Lane wrote: > Mike Christensen writes: >> Wouldn't it be faster/better/easier if Postgres just had its own built >> in UUID generator? > > Why would it be?  If you think you can easily improve on uuid-ossp, > you should go help them. I have no knowledge on t

Re: [GENERAL] You could be a PostgreSQL Patch Reviewer!

2011-06-15 Thread Tom Lane
Mike Christensen writes: > Wouldn't it be faster/better/easier if Postgres just had its own built > in UUID generator? Why would it be? If you think you can easily improve on uuid-ossp, you should go help them. regards, tom lane -- Sent via pgsql-general mailing list (

Re: [GENERAL] You could be a PostgreSQL Patch Reviewer!

2011-06-15 Thread Mike Christensen
Wouldn't it be faster/better/easier if Postgres just had its own built in UUID generator? Last I tested generating a bunch of UUIDs, it was quite slow (well compared to MS SQL anyway).. On Wed, Jun 15, 2011 at 10:23 PM, Tom Lane wrote: > Mike Christensen writes: >> Did anyone ever fix the annoy

Re: [GENERAL] You could be a PostgreSQL Patch Reviewer!

2011-06-15 Thread Tom Lane
Mike Christensen writes: > Did anyone ever fix the annoying thing where uuid_generate_v4() > doesn't work on Windows 64bit? AFAIR that was an issue with the uuid-ossp library, so it would be a matter for that upstream group to deal with. regards, tom lane -- Sent via pg

Re: [GENERAL] You could be a PostgreSQL Patch Reviewer!

2011-06-15 Thread Mike Christensen
Did anyone ever fix the annoying thing where uuid_generate_v4() doesn't work on Windows 64bit? On Wed, Jun 15, 2011 at 9:46 PM, Tom Lane wrote: > Craig Ringer writes: >> Any chance of flagging patches on the commitfest when they're platform >> specific? I'm hurting for time but will check out Wi

[GENERAL] Constraint to ensure value does NOT exist in another table?

2011-06-15 Thread Mike Christensen
I know I can setup a FK constraint to make sure Table1.ColA exists in Table2.Key, however what if I want to do the reverse? I want to ensure Table1.ColA does NOT exist in Table2.Key.. Can I do this with any sort of CHECK constraint, trigger, custom function, etc? Thanks! Mike -- Sent via pgsq

Re: [GENERAL] PGP encrypt/decrypt - Prereqistes

2011-06-15 Thread Vikram A
Dear Ringer,  I was out of station; i could not reply on time; sorry.  I shall follow all sort for ideas that you have given. I have decided to use the encrypt() and decrypt()functions. i could not found exact steps for using pgp_sym_encrypt() and pgp_sym_decrypt() Can I have your commend on m

Re: [GENERAL] You could be a PostgreSQL Patch Reviewer!

2011-06-15 Thread Tom Lane
Craig Ringer writes: > Any chance of flagging patches on the commitfest when they're platform > specific? I'm hurting for time but will check out Windows-specific stuff > if it's an area the project particularly needs help with. Well, a quick look through https://commitfest.postgresql.org/action/

Re: [GENERAL] You could be a PostgreSQL Patch Reviewer!

2011-06-15 Thread Craig Ringer
On 16/06/11 04:49, Josh Berkus wrote: > We especially need folks who are able to build PostgreSQL on Windows, as > we have several Windows-specific patches and no reviewers for them. Urrrggh. Does that mean I have to volunteer myself? ;-) I kind of regret learning to develop on Windows, beca

Re: [GENERAL] Encryption For Specific Column- Where to store the key

2011-06-15 Thread Craig Ringer
On 15/06/11 14:07, Manuel Gysin wrote: > A discussion about this topic can be found under > http://www.experts-exchange.com/Database/PostgreSQL/Q_21934798.html Use Stack Overflow instead ;-) Anyway: Given the additional detail you provided in that post, where it becomes clear that you only need

Re: [GENERAL] Encryption For Specific Column- Where to store the key

2011-06-15 Thread Craig Ringer
On 15/06/11 14:07, Manuel Gysin wrote: > - For the password field I just used a hash algorithm with some loops to > protect the passwords ("Password Storage Encryption" with bcrypt). Make sure you use a salt value and store the salt as well as the password. If not salted, your passwords will be

Re: [GENERAL] You could be a PostgreSQL Patch Reviewer!

2011-06-15 Thread sunpeng
Cool, I hope I could be a member of patch reviewers. peng sun On Thu, Jun 16, 2011 at 4:58 AM, Merlin Moncure wrote: > On Wed, Jun 15, 2011 at 3:49 PM, Josh Berkus wrote: > > PostgreSQL community members: > > > > Do you love the PostgreSQL project? Do you want to contribute to it? > > Do you w

[GENERAL] Symbols and versioning of binary releases; running a symbol server

2011-06-15 Thread Craig Ringer
Hi (EnterpriseDB) folks I've been working with someone off list to get some information about a crash they encounter during a batch run. We're generating a crash dump, but I'm having some issues getting matching symbols so I can examine it. One thing that would help with this would be if the

Re: [GENERAL] = ANY (SELECT ..) and type casts, what's going on here?

2011-06-15 Thread Tom Lane
Russell Smith writes: > Is anybody able to explain the following behaviour? > mr-russ=# SELECT 'BU'::varchar = ANY ((select '{BU,CI}'::varchar[])); > ERROR: operator does not exist: character varying = character varying[] > LINE 1: SELECT 'BU'::varchar = ANY ((select '{BU,CI}'::varchar[])); >

Re: [GENERAL] { SELECT *->NOT(column1, column2) FROM table } syntax idea

2011-06-15 Thread David Johnston
In this particular use-case that is doable; but the general idea of wanting to exclude specific columns from an output occurs in different areas including adhoc queries. I'm not saying this feature is going to compete with sliced bread for coolness but more than once I've desired this ability -

Re: [GENERAL] { SELECT *->NOT(column1, column2) FROM table } syntax idea

2011-06-15 Thread Susan Cassidy
Wouldn't it be easy enough to write a little program to suck in the column names from the information schema, and output the CREATE VIEW statement, excluding all the columns you want to exclude? Then, if the tables have changed, just run the program, let it fetch the information from the inform

Re: [GENERAL] { SELECT *->NOT(column1, column2) FROM table } syntax idea

2011-06-15 Thread David Johnston
>>On Wed, Jun 15, 2011 at 6:08 PM, David Johnston wrote: >>  The main reason to avoid doing so is to allow for a view to output all the columns of the underlying tables.  If I drop/create the view after altering the underlying tables the new view will have the additional columns without >>any dir

Re: [GENERAL] { SELECT *->NOT(column1, column2) FROM table } syntax idea

2011-06-15 Thread Derrick Rice
On Wed, Jun 15, 2011 at 6:08 PM, David Johnston wrote: > The main reason to avoid doing so is to allow for a view to output all > the columns of the underlying tables. If I drop/create the view after > altering the underlying tables the new view will have the additional columns > without any d

[GENERAL] Further details on cursors.

2011-06-15 Thread Matthew A. R. Sherian
I am running into an odd problem when fetching from multiple cursors in Perl. However, I do not feel knowledgeable enough to ask an intelligent question. Can you in the community direct me at some deeper documentation. Perhaps a developers guide (for Postgres itself), that might discuss the interna

[GENERAL] = ANY (SELECT ..) and type casts, what's going on here?

2011-06-15 Thread Russell Smith
Hi, Is anybody able to explain the following behaviour? Server is 8.4.7 RHEL5 build. Also happens on 8.4.8 Ubuntu x64 package. mr-russ=# SELECT 'BU'::varchar = ANY ((select '{BU,CI}'::varchar[])); ERROR: operator does not exist: character varying = character varying[] LINE 1: SELECT 'BU'::var

[GENERAL] { SELECT *->NOT(column1, column2) FROM table } syntax idea

2011-06-15 Thread David Johnston
Is there, or has there ever been, a discussion about introducing syntax to handle specifying which columns you do NOT want to output in the SELECT list? The use case I am running into is mostly within VIEWS. I want to specify "SELECT * FROM table" but there are a couple of fields that I do NOT

Re: [GENERAL] Invalid byte sequence for encoding "UTF8": 0xedbebf

2011-06-15 Thread BRUSSER Michael
-Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Alan Hodgson Sent: Wednesday, June 15, 2011 5:37 PM To: pgsql-general@postgresql.org Subject: Re: [GENERAL] Invalid byte sequence for encoding "UTF8": 0xedbebf On June 15,

Re: [GENERAL] Invalid byte sequence for encoding "UTF8": 0xedbebf

2011-06-15 Thread Alan Hodgson
On June 15, 2011 01:18:27 PM BRUSSER Michael wrote: > Unless there's no other options I don't want to use sed or break file into > pieces, if possible, iconv loads everything into RAM. You can use "split", convert the pieces, and then recombine, I did that when converting a large database to utf-

[GENERAL] Invalid byte sequence for encoding "UTF8": 0xedbebf

2011-06-15 Thread BRUSSER Michael
This is a follow-up on my previous message http://archives.postgresql.org/pgsql-general/2011-06/msg00054.php I think I have now some understanding of what's causing the problem, but I don't have a good solution, instead more questions. The release notes for v8.1 at http://www.postgresql.org/doc

Re: [GENERAL] You could be a PostgreSQL Patch Reviewer!

2011-06-15 Thread Merlin Moncure
On Wed, Jun 15, 2011 at 3:49 PM, Josh Berkus wrote: > PostgreSQL community members: > > Do you love the PostgreSQL project?  Do you want to contribute to it? > Do you want to help produce the next version of PostgreSQL? (9.2) > > Well, you *can*.  You can be a patch reviewer -- one of the single m

[GENERAL] You could be a PostgreSQL Patch Reviewer!

2011-06-15 Thread Josh Berkus
PostgreSQL community members: Do you love the PostgreSQL project? Do you want to contribute to it? Do you want to help produce the next version of PostgreSQL? (9.2) Well, you *can*. You can be a patch reviewer -- one of the single most valuable things you can contribute to the project. You do

Re: [GENERAL] pgadmin "Running VACUUM recommended"

2011-06-15 Thread Guillaume Lelarge
On Wed, 2011-06-15 at 16:01 -0400, Anibal David Acosta wrote: > Hello, I have installed postgres 9.0 that is supposed has by default > auto vacuum enabled > > > > But sometimes when I click over a table in the pgadmin, this > application recommend me to vacuum > > The message is: > > “The es

[GENERAL] pgadmin "Running VACUUM recommended"

2011-06-15 Thread Anibal David Acosta
Hello, I have installed postgres 9.0 that is supposed has by default auto vacuum enabled But sometimes when I click over a table in the pgadmin, this application recommend me to vacuum The message is: "The estimated rowcount on the table XXX deviates significantly from the actual rowcount. Y

[GENERAL] blks_read/blks_hit stats

2011-06-15 Thread Nigel Heron
Hi everyone, I'm playing with the stats views and functions to graph them in cacti.. Adding up *_blks_hit (heap, idx, toast and tidx) from pg_statio doesn't match blks_hit in pg_stat_database. Sometimes the sum is higher, sometimes lower. Do they have similar names but represent different metri

Re: [GENERAL] Setting up tablepace

2011-06-15 Thread John R Pierce
On 06/15/11 3:34 AM, Malm Paul wrote: Hi all, I have a problem with setting up tablespace on a ramdisk. the ramdisk shall be used temporary for storing unprotected map data, that is normaly protected. I'm working in Linux. I have an ordirnary Linux user called normaluser, a user called chartuse

Re: [GENERAL] Encryption For Specific Column- Where to store the key

2011-06-15 Thread Merlin Moncure
On Wed, Jun 15, 2011 at 1:07 AM, Manuel Gysin wrote: > Hello > I'm currently designing a database layout where some columns are encrypted. > Some tables contains sensitive user data which needs a special protection. > > I used http://www.postgresql.org/docs/8.1/static/encryption-options.html as a

Re: [GENERAL] Encryption For Specific Column- Where to store the key

2011-06-15 Thread Pavel Stehule
Hello try to use a security definer functions http://www.postgresql.org/docs/current/static/sql-createfunction.html inside this function you can access to resourcess thats are no available from outer for web user Regards Pavel Stehuke 2011/6/15 Manuel Gysin : > Hello > > > I'm currently desig

[GENERAL] Encryption For Specific Column- Where to store the key

2011-06-15 Thread Manuel Gysin
Hello I'm currently designing a database layout where some columns are encrypted. Some tables contains sensitive user data which needs a special protection. I used http://www.postgresql.org/docs/8.1/static/encryption-options.html as a guide. - For the password field I just used a hash algorith

Re: [GENERAL] Out of tree build issue

2011-06-15 Thread pedz
This appears to be an issue with GNU Make 3.82. I've opened a bug for postgres because you might want to figure out a work around. I also sent it to the make bug report. The postgresql bug report is http://archives.postgresql.org/pgsql-bugs/2011-06/msg00109.php -- Sent via pgsql-general mai

Re: [GENERAL] Cursors

2011-06-15 Thread Grzegorz Jaśkiewicz
Cursors only see the data that is the effect of the query. That output doesn't get updated. It would actually be pretty bad if that was the case. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-ge

Re: [GENERAL] configure error... please help 9.0.4

2011-06-15 Thread akp geek
Thanks all for the responses. Based on your suggestion, I could able to configure it . The way I fixed it was, I configured the uuid, readline and flex into the same path, then ran the configure command for postgres ./configure --prefix=/opt/postgres/9.0.4 --with-perl --with-libxml --with-openssl

Re: [GENERAL] Cursors

2011-06-15 Thread Merlin Moncure
On Tue, Jun 14, 2011 at 11:54 PM, Andy Chambers wrote: > Hi, > > What happens to cursors when new data is added to a table after you > start iterating > over its rows? > > For example, given the following loop... > > for rule in select tc.sid, tc.s, td.rule, td.returns >                     from t

[GENERAL] Setting up tablepace

2011-06-15 Thread Malm Paul
Hi all, I have a problem with setting up tablespace on a ramdisk. the ramdisk shall be used temporary for storing unprotected map data, that is normaly protected. I'm working in Linux. I have an ordirnary Linux user called normaluser, a user called chartuser (the ramdisk owner, the password is n

Re: [GENERAL] random backend crashes - Needed Information included

2011-06-15 Thread Craig Ringer
On 06/15/2011 05:52 PM, BangarRaju Vadapalli wrote: 7. Attached the database side and application side logs. Yeah, there's definitely a crash, you just chopped it off in the abbreviated logs you sent earlier. With this kind of log volume that's easy enough to do. Anyway, the crash is: 201

[GENERAL] psql \s not working - OS X

2011-06-15 Thread Joel Jacobson
I'm trying the new 9.1b2 release and got a weird problem with the \s command to show the latest history, for some reason it's trying to write to /dev/tty instead of printing out to stdout: Joel-Jacobsons-MacBook-Pro:~ joel$ uname -a Darwin Joel-Jacobsons-MacBook-Pro.local 10.7.4 Darwin Kernel Vers