Re: [GENERAL] How do I implement a .XSD in Postgres?

2016-01-03 Thread Marc Munro
On Sat, 2016-01-02 at 00:20 +, ERR ORR wrote: > I need to import some DB schemas which are defined in .XSD (a XML > derivative) format. > I've googled about this but have found no satisfactory answer. Perhaps > I > just don't know what exactly to ask Google. > > So please: > - What tool can I

[GENERAL] PostgreSQL Developer Best Practices

2015-08-25 Thread Marc Munro
On Sat, 2015-08-22 at 15:15 +, Melvin Davidson wrote: > I've been searching for a "PostgreSQL Developer Best Practices" with not > much luck, > so I've started my own. At the risk of stirring up a storm of controversy, > I would appreciate additional suggestions and feedback. > You might add:

Re: [GENERAL] [pgsql-general] Daily digest v1.13732 (15 messages)

2015-08-25 Thread Marc Munro
On Tue, 2015-08-25 at 15:41 +, Neil Tiffin wrote: > I really like the standardization that PostgreSQL uses in auto > generating default names. The rule I use is to always use the auto > generated names unless the object is referenced routinely in code. In > most cases developers don’t care

[GENERAL] configuring library path for debian build of postgres 9.2

2012-05-25 Thread Marc Munro
I'm trying to build postgres 9.2 beta1 on debian stable from sources, in a way that plays nicely with the debian cluster management stuff. If I configure with libdir=/usr/lib/postgres everything works but the shared libraries end up in the wrong place (ie just where I specified). If I configure

Re: [HACKERS] [GENERAL] Dropping extensions

2011-08-11 Thread Marc Munro
On Sat, 2011-07-30 at 22:46 +0200, Dimitri Fontaine wrote: > Tom Lane writes: > > Hmm. I don't think we have any code in there to prohibit the same > > object from being made a member of two different extensions ... but this > > example suggests that maybe we had better check that. > > I see you

[GENERAL] Dropping extensions

2011-07-22 Thread Marc Munro
In postgres 9.1 I have created 2 extensions, veil and veil_demo. When I install veil, it creates a default (not very useful) version of a function: veil_init(). When I create veil_demo, it replaces this version of the function with it's own (useful) version. If I drop the extension veil_demo, I

[GENERAL] waiting for notfications on the server

2011-06-10 Thread Marc Munro
I'd like to be able to wait for notify events using a user-defined C function. All of the examples and code I can find use libpq. Is there some way I can synchronously wait for notify events using SPI? Is there some reason this is a dumb idea? I wondered about the risk of deadlocking a backend

Re: [HACKERS] [GENERAL] Date conversion using day of week

2011-03-31 Thread Marc Munro
he postgres API goes, exposing a function that would validate a dayname returning a day number would resolve all of this for considerably less complexity. Also throwing an error in the to_date function for unexpectedly mixed input formats seems quite reasonable. Thanks for your time and atten

[GENERAL] Date conversion using day of week

2011-03-29 Thread Marc Munro
I'm trying to validate a day of the week, and thought that to_date would do the job for me. But I found a case where it cannot tell the difference between sunday and monday. Is this a bug or intended behaviour? dev=# select to_date('2011-13-Mon', '-IW-DY'); to_date 2011-03

Re: [GENERAL] Hiding data in postgresql

2010-05-25 Thread Marc Munro
On Mon, May 24, 2010 at 2:16 PM, Hector Beyers wrote: > > Hi guys, > does ANYONE have any tips on hiding data on a database server? This means > that data is stored in places that is not necessarily picked up in the > schema of the database. I am doing some research on databases and need some > di

[GENERAL] How to determine the operator class that an operator belongs to

2009-10-24 Thread Marc Munro
I'm trying to reconstruct create operator class statements from the catalogs. My problem is that access method operators are related only to their operator families. My current assumtion is that all operators for an operator class will have the same left and right operand types as the data type (

Re: [GENERAL] postgresql.key secure storage

2009-09-13 Thread Marc Munro
On Sun, 2009-09-13 at 12:04 -0300, pgsql-general-ow...@postgresql.org wrote: > >A user must have the TRUNCATE privilege to truncate a table or be the > >tables owner. > > Well the TRUNCATE example I mentioned is perhaps not explicit of what > I meant > to say. A user who can modify data in a cli

[GENERAL] Looking for "proper" escape string syntax from pg_get_constraintdef

2009-08-31 Thread Marc Munro
I am trying to recreate a domain definition from information in pg_catalog and getting the following warnings: WARNING: nonstandard use of \\ in a string literal LINE 3: CHECK (((VALUE ~ '^\\d{4}$'::text) OR (VALUE ~ '^\\d{5}-\\... ^ HINT: Use the escape strin

Re: [GENERAL] Design Database, 3 degrees of Users.

2009-07-31 Thread Marc Munro
that they want to do this is, consider very carefully whether the benefits of a VPD are worth the cost. It is generally much easier to place the sort of controls you need in your application than in the database. __ Marc Munro (developer of veil) -- Sent via pgsql-general mailing list (pgsql-

Re: [GENERAL] pgmemcache status

2008-07-10 Thread Marc Munro
On Wed, 2008-07-09 at 20:42 -0300, [EMAIL PROTECTED] wrote: > > Is pgmemcache still being actively supported/developed? I have > > experienced a database crash with postgres 8.3.3 and pgmemcache > 1.2beta1 > > Yes and no. I just joined up, and hope to be submitting some patches > to it soon, as w

[GENERAL] pgmemcache status

2008-07-09 Thread Marc Munro
Hope this is the right place to ask. Apologies if not. Is pgmemcache still being actively supported/developed? I have experienced a database crash with postgres 8.3.3 and pgmemcache 1.2beta1 Doing select * from pg_settings (with shared_preload_libraries defined and no custom variable definition

[GENERAL] Surprising syntax error

2008-05-14 Thread Marc Munro
The statement: revoke all on view internal.all_objects from public; yields a syntax error. The docs show that the word "view" is not acceptable in this statement which is fine but the surprising thing is that:  revoke all on table internal.all_objects from public; works fine even though al

[GENERAL] Storage sizes for dates/times (documentation bug?)

2008-04-14 Thread Marc Munro
I was just looking at the 8.3.1 documentation on the postgresql web site. According to the docs, timestamp with time zone takes less space than time with time zone with the same resolution. Is this a documentation bug? It makes no sense to me that by storing the date with the time you can save 4

[GENERAL] catalog info for sequences

2008-02-11 Thread Marc Munro
Can someone please tell me how to extract the mix, max, increment by, etc, values for a sequence from the system catalogs. Is this in the manual somewhere (I couldn't find it)? Thanks __ Marc ---(end of broadcast)--- TIP 1: if posting/reading t

Re: [GENERAL] Oddity in column specifications for table creation

2007-12-11 Thread Marc Munro
On Tue, 2007-11-12 at 19:32 -0500, Tom Lane wrote: > Marc Munro <[EMAIL PROTECTED]> writes: > > This works fine: > > "str2"varchar(40) > > This does not: > > "str2""pg_catalog"."varch

[GENERAL] Oddity in column specifications for table creation

2007-12-11 Thread Marc Munro
It seems that in create table I cannot specify the schema of a built-in type that has a length specifier. Nor can I double-quote the type name. Is this correct/expected behaviour, and are there work-arounds? This works fine: create table "public"."additional" ( "str1""pg_catalo

[GENERAL] Identifying casts

2007-12-07 Thread Marc Munro
Is there any way of identifying whether a cast was built-in or is user-defined? I am tempted to just assume that if the cast is to/from a user-defined type or uses a user-defined function that it is user-defined. I suspect though that a user could define a new cast on pre-defined types using a pr

[GENERAL] Coordinating database user accounts with active directory

2007-11-21 Thread Marc Munro
I have a client that wants to use active directory for authentication of connections to a postgres database. They want to be able to monitor what each user is doing so believe that the best solution is to have one database account per user. However, they do not want to have to manage the

[GENERAL] cascade and restrict options to alter domain drop constraint

2007-09-25 Thread Marc Munro
I am puzzled by the cascade and restrict options to the alter domain drop constraint command. I do not see how a dropping a check constraint should cascade to anything, or indeed be restricted by anything. My reasoning is simple: if I drop a check constraint on a domain, no data should be affecte

Re: [GENERAL] [pgsql-general] Separation of clients' data within a database

2006-11-30 Thread Marc Munro
On Thu, 2006-30-11 at 17:22 -0400, [EMAIL PROTECTED] wrote: > Date: Thu, 30 Nov 2006 12:48:53 -0600 > From: John McCawley <[EMAIL PROTECTED]> > To: pgsql-general@postgresql.org > Subject: Separation of clients' data within a database > Message-ID: <[EMAIL PROTECTED]> > > ... I would assume there a

Re: [GENERAL] per-row security

2006-11-06 Thread Marc Munro
On Mon, 2006-06-11 at 22:27 +0100, Alexander Staubo wrote: > On Nov 6, 2006, at 21:00 , Marc Munro wrote: > > > For an alternative approach, you might want to check out Veil: > > http://pgfoundry.org/projects/veil > > Addendum: I took Veil to be undocumented since the

Re: [GENERAL] [pgsql-general] Daily digest v1.6578 (20 messages)

2006-11-06 Thread Marc Munro
On Sat, 2006-04-11 at 06:13 -0400, [EMAIL PROTECTED] wrote: > Date: Fri, 3 Nov 2006 23:08:47 +0100 > From: Alexander Staubo <[EMAIL PROTECTED]> > To: PgSQL General > Subject: Per-row security > Message-ID: <[EMAIL PROTECTED]> > > I am designing an application which requires fine-grained role-base

[GENERAL] Alter table alter column

2006-10-06 Thread Marc Munro
Am I right in thinking that altering a column from varchar(n) to varchar(n+m) requires each tuple to be visited? Recent experience suggests this is the case but my reading of the docs has left me uncertain why this should be so. We are not changing the fundamental type of the column, nor are we a

Re: [GENERAL] Something blocking in libpq_gettext?

2006-08-25 Thread Marc Munro
On Fri, 2006-08-25 at 15:43 -0400, Tom Lane wrote: > Marc Munro <[EMAIL PROTECTED]> writes: > > As near as we can tell, it looks like libpq blocked inside poll inside > > libpq_gettext. > > > #0 0xe405 in __kernel_vsyscall () > > #1 0x005a31d4 in pol

Re: [GENERAL] Something blocking in libpq_gettext?

2006-08-25 Thread Marc Munro
On Fri, 2006-08-25 at 15:42 -0400, Alvaro Herrera wrote: > SHOW lc_messages, I think. Is it something else than C? If so, it will > probably try to read the corresponding postgres.mo file. Do the hung > processes have that file open? (I'm not sure if you can find that out > from only the core f

Re: [GENERAL] Something blocking in libpq_gettext?

2006-08-25 Thread Marc Munro
On Fri, 2006-08-25 at 15:10 -0400, Alvaro Herrera wrote: > Wow, that's strange. Maybe it's trying to fetch something in the > message catalogs. What are your locale settings? > I'm not sure exactly what you need to know. I do have this tho: LANG=en_US.UTF-8 What other information would be h

[GENERAL] Something blocking in libpq_gettext?

2006-08-25 Thread Marc Munro
Often, when we get short-lived network problems (like when our network admins break the firewall), postgres client apps will lock-up. They do not recover once the network is back to normal, do not time-out, and do not fail with any sort of error. This has been happening since at least postgres 7.

[GENERAL] Spontaneous character encoding change?

2006-05-23 Thread Marc Munro
Has anyone ever seen a database spontaneously change character sets? I could have sworn that all databases in my replication slave database cluster were set up as SQL_ASCII. Now they are all UNICODE, and slony is failing to replicate, due to invalid byte sequences. Now I can't really *swear* tha

Re: [GENERAL] Thoughts on a Isolation/Security problem

2006-04-18 Thread Marc Munro
You are talking about row-level security. Different users must be able to see different subsets of data. This sounds like a job for Veil: http://veil.projects.postgresql.org/ Veil allows you to implement row-level access controls based upon any criteria you can define. In your case, this woul

Re: [GENERAL] Grant Priviliges on column

2006-03-17 Thread Marc Munro
No, but Veil allows you do it: http://veil.projects.postgresql.org/ Be warned, implementing column or row-level privileges is not trivial. If you are sure you need to do it and want to try Veil, I'll give you what help I can. __ Marc On Fri, 2006-03-17 at 11:50 -0400, [EMAIL PROTECTED] wrote: >

Re: [GENERAL] [pgsql-general] Daily digest v1.5986 (24 messages)

2006-03-06 Thread Marc Munro
Sylvain, All of the things you want to do can be done using Veil: http://veil.projects.postgresql.org/ Be warned though, it is not simple. If you want privileges at the column level, or based on a where clause, you will have to use techniques like Veil's secured views. It's better to avoid this

Re: [GENERAL] altering objects owned by other user

2006-02-14 Thread Marc Munro
Tom, Thanks. Good suggestions, both. I'm going to defer this problem until we are able to upgrade. __ Marc On Mon, 2006-02-13 at 14:18 -0500, Tom Lane wrote: > Marc Munro <[EMAIL PROTECTED]> writes: > > I want to allow a non-superuser to alter objects owned by another user

[GENERAL] altering objects owned by other user

2006-02-13 Thread Marc Munro
I want to allow a non-superuser to alter objects owned by another user. This should be an audited operation (logging a notice of what was done to the postgres logs is sufficient). This is so that I can allow trusted users to perform maintenance operations without having to give them either superus

Re: [GENERAL] Privilege for seeing queries using

2006-01-19 Thread Marc Munro
ction public.pg_stat_get_backend_activity(integer) returns text as ' begin return pg_catalog.pg_stat_get_backend_activity($1); end; ' language plpgsql security definer; __ Marc On Thu, 2006-01-19 at 12:38 -0500, Tom Lane wrote: > Marc Munro <[EMAIL PROTECTED]> writes: > > I want certa

[GENERAL] Privilege for seeing queries using pg_stat_get_backend_activity

2006-01-19 Thread Marc Munro
I want certain users to be able to examine running queries using pg_stat_get_backend_activity. Unfortunately, this will only show other users' activity if you have superuser privilege. I do not want to give monitoring users superuser privilege, but I do need to allow them to perform monitoring ta

[GENERAL] bit/integer operations in postgres

2006-01-03 Thread Marc Munro
If I understand this correctly, I think you want to implement the sort of security that Veil provides. Take a look at http://pgfoundry.org/projects/veil/ The documentation is at http://veil.projects.postgresql.org/curdocs/index.html __ Marc On Sun, 2006-01-01 at 17:02 -0400, littlebutty wrote:

Re: [GENERAL] I want to know how to improve the security of postgresql

2006-01-03 Thread Marc Munro
w how to improve the security of postgresql > Message-ID: <[EMAIL PROTECTED]> > > On Thu, Dec 29, 2005 at 09:22:09AM -0800, Marc Munro wrote: > > > http://pgfoundry.org/projects/veil/ > Marc, is there a higher level written summary available > somewhere to be read to u

Re: [GENERAL] I want to know how to improve the security of postgresql

2005-12-29 Thread Marc Munro
Sting, I'm not entirely sure what you mean by improving the security of postgresql but if you want to implement smart, efficient row-level security you could take a look at Veil http://pgfoundry.org/projects/veil/ Check the project home page for documentation. Veil is still an alpha release but I

Re: [GENERAL] Replicating databases

2005-11-02 Thread Marc Munro
Carlos, What you are asking for is a multi-master replication scheme. Slony-I is a single master system, meaning that for each slony cluster only one node can make changes to the data. Without breaking slony's normal rules, I believe that there might be a way to do it, though it will not be prett

Re: [GENERAL] [pgsql-general] Daily digest v1.5657 (16 messages)

2005-10-24 Thread Marc Munro
Florian, Reponses from, an ex-Oracle DBA, below. On Mon, 2005-10-24 at 11:51 -0300, [EMAIL PROTECTED] wrote: > Date: Mon, 24 Oct 2005 14:29:24 +0200 > From: Florian Ledoux <[EMAIL PROTECTED]> > To: pgsql-general@postgresql.org > Subject: pg_dump, MVCC and consistency > Message-ID: <[EMAIL PROTECTE

Re: [GENERAL] [pgsql-general] Daily digest v1.5632 (18 messages)

2005-10-17 Thread Marc Munro
Nikolay, I think I must be missing your point. Even if updatable views existed, I would still have created Veil. The real point of Veil is to control each type of operation (insert, update, etc) on each record. With updatable views, you could avoid a lot of the tedium of creating the instead-of

Re: [GENERAL] dynamic loading of .so

2005-10-17 Thread Marc Munro
If you need user-accessible shared variables, you could take a look at how Veil http://pgfoundry.org/projects/veil/ achieves this. Veil provides a limited number of shared variables with an API for SQL access. The variables may only be set during initialisation or reset to avoid system state chan

Re: [GENERAL] Setting up a fine-grained permission system

2005-10-13 Thread Marc Munro
Dave, Sorry to be so late in responding to this but I may have just the solution for you. Please check out Veil at pgfoundry. This is an add-on to Postgres that I think does just what you are looking for. As the developer of this project, I would be pleased to offer you assistance. http://veil.

Re: [GENERAL] [pgsql-general] Daily digest v1.5557 (21 messages)

2005-09-19 Thread Marc Munro
Brew, Yep we tried that. It did nothing. The same pg_hba.conf change worked when we later tried it with the client disconnected. __ Marc > Date: Fri, 16 Sep 2005 21:36:01 -0400 (EDT) > From: [EMAIL PROTECTED] > To: pgsql-general@postgresql.org > Subject: Re: pg_ctl reload breaks our client > Me

Re: [GENERAL] pg_ctl reload breaks our client

2005-09-19 Thread Marc Munro
Sep 16, 2005 at 04:34:46PM -0700, Marc Munro wrote: > >> On Fri, 2005-09-16 at 17:10 -0600, Michael Fuhr wrote: > >> This is not currently seen as a priority (the work-around of "don't do > >> that" is seen as sufficient). I'm simply hoping to get someo

Re: [GENERAL] pg_ctl reload breaks our client

2005-09-16 Thread Marc Munro
Michael, Many thanks for your response; it is much appreciated. My responses are embedded below: On Fri, 2005-09-16 at 17:10 -0600, Michael Fuhr wrote: > On Fri, Sep 16, 2005 at 02:16:29PM -0700, Marc Munro wrote: > > It is Postgres 7.3.6. The client is a multi-threaded C++ cli

Re: [GENERAL] pg_ctl reload breaks our client

2005-09-16 Thread Marc Munro
gt; On Fri, Sep 16, 2005 at 01:28:13PM -0700, Marc Munro wrote: > > Yesterday a client application broke immediately after we issued a > > pg_ctl reload command. > > How did the client break? What behavior did it exhibit? Were there > any errors in the server's logs? Can

[GENERAL] pg_ctl reload breaks our client

2005-09-16 Thread Marc Munro
hanks. __ Marc Munro signature.asc Description: This is a digitally signed message part

[GENERAL] Transaction id wraparound questions

2005-07-06 Thread Marc Munro
8856359, 938856359 "template0",427, 427 All responses welcomed. __ Marc Munro signature.asc Description: This is a digitally signed message part

Re: [GENERAL] Waiting for select

2005-06-10 Thread Marc Munro
at 18:48 -0400, Tom Lane wrote: > Marc Munro <[EMAIL PROTECTED]> writes: > > Can someone explain this? I seem to have a query which is being blocked > > by a lock. I was under the impression that selects are never blocked. > > AccessExclusiveLock blocks anything. &

[GENERAL] Waiting for select

2005-06-10 Thread Marc Munro
Can someone explain this? I seem to have a query which is being blocked by a lock. I was under the impression that selects are never blocked. Am I missing something or is this bad behaviour? I am using slony and am synchronising a slave for the first time. In the hope of seeing some progress on

Thanks. Was: [GENERAL] Need to determine how badly tables need vacuuming

2005-05-12 Thread Marc Munro
Thanks to both Elein and Tom. pgstattuple (and dbsize) from contrib gave me exactly what I wanted. The statistics views give me something extra. __ Marc signature.asc Description: This is a digitally signed message part

[GENERAL] Need to determine how badly tables need vacuuming

2005-05-11 Thread Marc Munro
t the number of dead tuples without actually doing a vacuum? Thanks. __ Marc Munro signature.asc Description: This is a digitally signed message part