[GENERAL] USER Profiles for PostgreSQL

2017-09-19 Thread chiru r
Hi All, Good Morning. We are looking for User profiles in ope source PostgreSQL. For example, If a user password failed n+ times while login ,the user access has to be blocked few seconds. Please let us know, is there any plan to implement user profiles in feature releases?. Thanks, Chiranj

Re: [GENERAL] $user namespace with pg_dump?

2016-03-02 Thread Adrian Klaver
On 03/02/2016 09:06 AM, Mark E. Haase wrote: I can `SET search_path TO "$user",foo,bar,public` and the first path element will expand to the current user. Can I do the same for `pg_dump -n`? I've tried many variations but none of them appear to work: pg_dump -U myuser -n '($user|foo|bar|pu

[GENERAL] $user namespace with pg_dump?

2016-03-02 Thread Mark E. Haase
I can `SET search_path TO "$user",foo,bar,public` and the first path element will expand to the current user. Can I do the same for `pg_dump -n`? I've tried many variations but none of them appear to work: pg_dump -U myuser -n '($user|foo|bar|public)' ... pg_dump -U myuser -n '("$user"|fo

Re: [GENERAL] user connection not recorded?

2015-07-30 Thread Tom Lane
Adrian Klaver writes: > Alright, but the part that has me confused is this comment in the code: > * In standalone mode and in autovacuum worker processes, we use a fixed > * ID, otherwise we figure it out from the authenticated user name. > and this > else if (IsBackgroundWorker) > I read

Re: [GENERAL] user connection not recorded?

2015-07-30 Thread Adrian Klaver
On 07/30/2015 07:46 AM, Tom Lane wrote: Adrian Klaver writes: Eventually got around to figuring that. So just for my reference, the code snippet I showed from postinit.c seems to show a path where a username is not used but is substituted with BOOTSTRAP_SUPERUSERID. That's single-user mode.

Re: [GENERAL] user connection not recorded?

2015-07-30 Thread Tom Lane
Adrian Klaver writes: > Eventually got around to figuring that. So just for my reference, the > code snippet I showed from postinit.c seems to show a path where a > username is not used but is substituted with BOOTSTRAP_SUPERUSERID. That's single-user mode. > Am I following that correctly and

Re: [GENERAL] user connection not recorded?

2015-07-30 Thread Adrian Klaver
On 07/30/2015 07:21 AM, Tom Lane wrote: Adrian Klaver writes: On 07/30/2015 06:42 AM, Melvin Davidson wrote: I can understand that the host is not available in nslookup, but why is the user not being recorded? A quick look at the source shows that Postgres system process can have NULL user

Re: [GENERAL] user connection not recorded?

2015-07-30 Thread Adrian Klaver
On 07/30/2015 07:12 AM, Melvin Davidson wrote: Thanks for the quick reply Adrian. Further testing shows this can happen in other situations. So: aklaver@panda:~> psql -d test psql (9.4.2) Type "help" for help. test=> where trust is set up for local connections yields: [unknown]-2015-07-30

Re: [GENERAL] user connection not recorded?

2015-07-30 Thread Melvin Davidson
Thanks for the quick reply Adrian. On Thu, Jul 30, 2015 at 10:09 AM, Adrian Klaver wrote: > On 07/30/2015 06:42 AM, Melvin Davidson wrote: > > I have a puzzling question. > > > > All through the error log, there are connections for [unknown] user. > > EG: > > 2015-07-30 00:00:00 CDT [6577]: [1-

[GENERAL] user connection not recorded?

2015-07-30 Thread Melvin Davidson
I have a puzzling question. All through the error log, there are connections for [unknown] user. EG: 2015-07-30 00:00:00 CDT [6577]: [1-1]: : [unknown]: LOG: connection received: host=173.239.101.98 port=50687 The log_line_prefix is %t [%p]: [%l-1]: %h: %u: I can understand that the host is

Re: [GENERAL] user constructed where clause

2015-06-12 Thread Yelai, Ramkumar IN BLR STS
sday, June 10, 2015 1:48 AM To: Yelai, Ramkumar IN BLR STS Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] user constructed where clause On Tue, Jun 9, 2015 at 4:48 AM, Yelai, Ramkumar IN BLR STS mailto:ramkumar.ye...@siemens.com>> wrote: Now, the requirement is if user provi

Re: [GENERAL] user constructed where clause

2015-06-09 Thread David G. Johnston
On Tue, Jun 9, 2015 at 4:48 AM, Yelai, Ramkumar IN BLR STS < ramkumar.ye...@siemens.com> wrote: > Now, the requirement is if user provides filter information based on > every column from the web UI, this filter will let the user construct the > “where clause” and provide to postgresql. > In a mon

[GENERAL] user constructed where clause

2015-06-09 Thread Yelai, Ramkumar IN BLR STS
Hi All, I have one requirement in my project and don't know how to achieve. My project is receiving the log information from PC in the network, and that information is stored in the below table. CREATE TABLE "PCLogTable" ( "LOG_ID" serial NOT NULL, "LOG_USER_ID" integer DEFAULT 0, "LOG_TY

Re: [GENERAL] User-defined operator function: what parameter type to use for uncast character string?

2014-07-31 Thread Kevin Grittner
Adam Mackler wrote: > CREATE domain my_domain as char(3) check(VALUE similar to '[A-C]{3}'); > CREATE TABLE my_table (val my_domain); > INSERT INTO my_table VALUES ('ABC'); > sandbox=> SELECT * FROM my_table WHERE val='abc'; > val > - > (0 rows) > > Question: What

[GENERAL] User-defined operator function: what parameter type to use for uncast character string?

2014-07-30 Thread Adam Mackler
(Cross-posted to StackOverflow: http://stackoverflow.com/questions/25041100/postgresql-user-defined-operator-function-what-parameter-type-to-use-for-uncast ) I'm defining my own domain and a equality operator. I cannot cause PostgreSQL to use my operator function in a query without explicitly c

Re: [GENERAL] User defined operator fails to work in EXCLUDE constraint

2014-04-13 Thread Paul Jones
- Original Message - > From: Tom Lane > To: Paul Jones > Cc: "pgsql-general@postgresql.org" > Sent: Sunday, April 13, 2014 4:25 PM > Subject: Re: [GENERAL] User defined operator fails to work in EXCLUDE > constraint > > Paul Jones writes: &

Re: [GENERAL] User defined operator fails to work in EXCLUDE constraint

2014-04-13 Thread Tom Lane
Paul Jones writes: > I tried to define my own circle operator to use in an EXCLUDE constraint but > it fails to detect > insertion of rows that should not be simultaneously be allowed in the table.  > The operator > compares two circles' radii and works for a simple SELECT.  What am I doing > w

[GENERAL] User defined operator fails to work in EXCLUDE constraint

2014-04-13 Thread Paul Jones
I tried to define my own circle operator to use in an EXCLUDE constraint but it fails to detect insertion of rows that should not be simultaneously be allowed in the table.  The operator compares two circles' radii and works for a simple SELECT.  What am I doing wrong? Here is the code to repro

Re: [GENERAL] User defined cast creation

2013-07-05 Thread Pavel Stehule
Hello 2013/7/5 Arun P.L : > Hi friends, > > When I try to create a function which is used in user defined type cast I > get the following error, > > CREATE FUNCTION pg_catalog.text1(integer) RETURNS text STRICT IMMUTABLE > LANGUAGE SQL AS 'SELECT textin(int4out($1));'; > ERROR: permission denied

[GENERAL] User defined cast creation

2013-07-05 Thread Arun P . L
Hi friends, When I try to create a function which is used in user defined type cast I get the following error, CREATE FUNCTION pg_catalog.text1(integer) RETURNS text STRICT IMMUTABLE LANGUAGE SQL AS 'SELECT textin(int4out($1));'; ERROR: permission denied for schema pg_catalog I am not trying

Re: [GENERAL] User postgres unable to revoke privileges?

2013-06-09 Thread Tom Lane
=?iso-8859-1?Q?Fran=E7ois_Beausoleil?= writes: > Le 2013-06-06 à 17:59, Tom Lane a écrit : >> Note where the fine manual says: >> >> schema_name >> The name of an existing schema. Each target_role must have CREATE privileges >> for each specified schema. >> >> There was some debate previously a

Re: [GENERAL] User postgres unable to revoke privileges?

2013-06-07 Thread François Beausoleil
Le 2013-06-06 à 17:59, Tom Lane a écrit : > =?iso-8859-1?Q?Fran=E7ois_Beausoleil?= writes: >> regress=# ALTER DEFAULT PRIVILEGES FOR ROLE dataanalysts IN SCHEMA public >> REVOKE SELECT ON TABLES FROM dataanalysts; >> ERROR: permission denied for schema public > >> I'm logged in as postgres, t

Re: [GENERAL] User postgres unable to revoke privileges?

2013-06-06 Thread Tom Lane
=?iso-8859-1?Q?Fran=E7ois_Beausoleil?= writes: > regress=# ALTER DEFAULT PRIVILEGES FOR ROLE dataanalysts IN SCHEMA public > REVOKE SELECT ON TABLES FROM dataanalysts; > ERROR: permission denied for schema public > I'm logged in as postgres, the database superuser. Why am I getting a > permiss

[GENERAL] User postgres unable to revoke privileges?

2013-06-06 Thread François Beausoleil
Hi all! I would like to remove the second line from default privileges, because dataanalysts can't create new tables in public anyway: # psql -U postgres psql (9.1.9) Type "help" for help. regress=# \ddp Default access privileges Owner |Schema| Type |

Re: [GENERAL] user aggregate function ( calculate the average value of each index of an array column )

2012-11-18 Thread Vincent Veyron
Le jeudi 15 novembre 2012 à 19:10 +0100, Myoung-Ah KANG a écrit : > > > I have a table with several lines as following; > > > > - Create table mytable (type number , values integer [2]) ; > > > > - Insert into mytable values (1, ‘{ 10, 0 }’ ); > > - Insert

[GENERAL] user aggregate function ( calculate the average value of each index of an array column )

2012-11-16 Thread Myoung-Ah KANG
Hi, I have a table with several lines as following; - Create table mytable (type number , values integer [2]) ; - Insert into mytable values (1, '{ 10, 0 }' ); - Insert into mytable values (1, '{ 20, 30 }' ); - Insert into mytable values (2, '

Re: [GENERAL] user defined XML aggregate not working as (i think) it should

2012-10-03 Thread Rhys A.D. Stewart
Thanks Tom, That was indeed the issue. Regards, Rhys On Wed, Oct 3, 2012 at 8:58 PM, Tom Lane wrote: > "Rhys A.D. Stewart" writes: >> I have an xml aggregate function that always returns 'ERROR: invalid >> XML content'. However an identical function that uses text produces >> valid xml with

Re: [GENERAL] user defined XML aggregate not working as (i think) it should

2012-10-03 Thread Tom Lane
"Rhys A.D. Stewart" writes: > I have an xml aggregate function that always returns 'ERROR: invalid > XML content'. However an identical function that uses text produces > valid xml with the same inputs. I believe the reason this doesn't work is that the aggregate's initial value is faulty: it's

Re: [GENERAL] User-defined Aggregate function and performance.

2012-04-03 Thread Ronan Dunklau
On 02/04/2012 18:06, Tom Lane wrote: > Ronan Dunklau writes: >> I'm trying to define a "weighted mean" aggregate using postgresql create >> aggregate feature. > >> I've been able to quickly write the required pgsql code to get it >> working, but after testing it on a sample 1 rows table, it se

Re: [GENERAL] User-defined Aggregate function and performance.

2012-04-02 Thread Tom Lane
Ronan Dunklau writes: > I'm trying to define a "weighted mean" aggregate using postgresql create > aggregate feature. > I've been able to quickly write the required pgsql code to get it > working, but after testing it on a sample 1 rows table, it seems to > be approximately 6 to 10 times slow

[GENERAL] User-defined Aggregate function and performance.

2012-04-02 Thread Ronan Dunklau
Hello. I've tried asking this on the irc channel, without much success. I'm trying to define a "weighted mean" aggregate using postgresql create aggregate feature. I've been able to quickly write the required pgsql code to get it working, but after testing it on a sample 1 rows table, it see

Re: [GENERAL] user get notification when postgresql database updated

2012-03-30 Thread Alban Hertroys
On 29 Mar 2012, at 11:43, Albert wrote: > it a browser based application. so would you advice me about the best way to > poll the database for notifications ? > > I've been read about DB triggers but still can't tell if it will help me. The HTTP protocol doesn't have a push mechanism, so you c

Re: [GENERAL] user get notification when postgresql database updated

2012-03-30 Thread Albert
another Q : my app should display notifications to each user depends on his selected cars. can i do that just using ajax and php ? -- View this message in context: http://postgresql.1045698.n5.nabble.com/user-get-notification-when-postgresql-database-updated-tp5600187p5606001.html Sent from the

Re: [GENERAL] user get notification when postgresql database updated

2012-03-29 Thread Albert
Thanks for your response! it a browser based application. so would you advice me about the best way to poll the database for notifications ? I've been read about DB triggers but still can't tell if it will help me. -- View this message in context: http://postgresql.1045698.n5.nabble.com/user-

Re: [GENERAL] user get notification when postgresql database updated

2012-03-28 Thread Tom Molesworth
On 28/03/12 12:40, Albert wrote: I am using javaScript app and PostgreSQL database. I have car_alert as a table contains id (FK of cars table) and userid (FK of users table) each car has a status ( status column in cars table ). car_alert is updating and having new records (car id and userid ) e

[GENERAL] user get notification when postgresql database updated

2012-03-28 Thread Albert
I am using javaScript app and PostgreSQL database. I have car_alert as a table contains id (FK of cars table) and userid (FK of users table) each car has a status ( status column in cars table ). car_alert is updating and having new records (car id and userid ) every time user choose car to be al

Re: [GENERAL] User feedback requested on temp tables usage for Hot Standby

2011-10-27 Thread Ben Chobot
On Oct 27, 2011, at 5:13 PM, Simon Riggs wrote: > Some people have asked for the ability to create temp tables on a Hot > Standby server. > > I've got a rough implementation plan but it would have some > restrictions, so I would like to check my understanding of the use > case for this feature so

[GENERAL] User feedback requested on temp tables usage for Hot Standby

2011-10-27 Thread Simon Riggs
Some people have asked for the ability to create temp tables on a Hot Standby server. I've got a rough implementation plan but it would have some restrictions, so I would like to check my understanding of the use case for this feature so I don't waste time implementing something nobody actually fi

Re: [GENERAL] user-interface to upload csv files

2011-10-06 Thread Albe Laurenz
Robert Buckley wrote: > I am having problems getting csv files into postgres. Does anyone know if > there is an opensource user- > interface to tackle this? Did you try the COPY command (or \copy in psql)? Yours, Laurenz Albe -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org

Re: [GENERAL] user-interface to upload csv files

2011-10-05 Thread Craig Ringer
On 10/06/2011 01:47 PM, Robert Buckley wrote: Hi, I am having problems getting csv files into postgres. Does anyone know if there is an opensource user-interface to tackle this? If it's a well-behaved CSV file, use the COPY command or psql's \copy. For more complicated work, use an ETL tool l

[GENERAL] user-interface to upload csv files

2011-10-05 Thread Robert Buckley
Hi, I am having problems getting csv files into postgres. Does anyone know if there is an opensource user-interface to tackle this? yours, Rob

[GENERAL] user mapping options question

2011-03-16 Thread Sergey Urlin
Hello, I’m using dblink package to execute queries between two postgresql databases. Access definitions for the dblink are created using foreign data wrapper, server and user mappings. When I set user and password as options then postgres saves these parameters in four system tables (table pg_

Re: [GENERAL] User function canceling VACUUMDB utility

2010-09-13 Thread Tom Lane
Carlos Henrique Reimer writes: > Yes, once correct schema was included in the search_path, VACUUM and ANALYZE > run fine again. You'd be better advised to fix the function so it works regardless of caller's search_path. As-is, it's a loaded gun pointed at your foot. rega

Re: [GENERAL] User function canceling VACUUMDB utility

2010-09-13 Thread Carlos Henrique Reimer
Hi, Yes, once correct schema was included in the search_path, VACUUM and ANALYZE run fine again. Thank you! On Fri, Sep 10, 2010 at 11:38 AM, Tom Lane wrote: > Carlos Henrique Reimer writes: > > Yes, you're right! I found out a functional index using this function and > > ANALYZE also cancels

Re: [GENERAL] User function canceling VACUUMDB utility

2010-09-10 Thread Tom Lane
Carlos Henrique Reimer writes: > Yes, you're right! I found out a functional index using this function and > ANALYZE also cancels. > Is there a way to code this function in a way VACUUM/ANALYZE does not > cancel? I think your problem is probably a search_path issue, ie vacuumdb is not running wi

Re: [GENERAL] User function canceling VACUUMDB utility

2010-09-10 Thread Carlos Henrique Reimer
Hi, Yes, you're right! I found out a functional index using this function and ANALYZE also cancels. Is there a way to code this function in a way VACUUM/ANALYZE does not cancel? Thank you! brasil=# analyze "BRASIL".tt_tit; ERROR: invalid type name "TT_TIT.SEQCAN%TYPE" CONTEXT: compile of PL/p

Re: [GENERAL] User function canceling VACUUMDB utility

2010-09-09 Thread Tom Lane
Carlos Henrique Reimer writes: > We are facing the following problem in a PG 8.2 server when trying to vacuum > one of our databases: > vacuumdb: vacuuming of database "reimer" failed: ERROR: invalid type name > "TT_TIT.SEQCAN%TYPE" > [ which seems to be coming from out-of-date code in a function

[GENERAL] User function canceling VACUUMDB utility

2010-09-09 Thread Carlos Henrique Reimer
Hi, We are facing the following problem in a PG 8.2 server when trying to vacuum one of our databases: vacuumdb: vacuuming database "reimer" INFO: vacuuming "pg_catalog.pg_database" INFO: "pg_database": found 0 removable, 6 nonremovable row versions in 1 pages INFO: index "pg_database_datname_

Re: [GENERAL] User defined type - analyze problem

2010-05-04 Thread Carsten Kropf
Thanks a lot, this helped me with the messages. I thought, I would only have to define a operator class that fullfills at least the equals strategy. I didn't know, that I would have to provide a "full" btree operator class. Best regards Carsten Kropf Am 03.05.2010 um 15:56 schrieb Tom La

Re: [GENERAL] User defined type - analyze problem

2010-05-03 Thread Tom Lane
Carsten Kropf writes: > I read somewhere, that this can be solved by preparing a operator class for > btree and passing a comparison function for equality there. I did this with > the following lines: > CREATE OPERATOR CLASS pointnd_btree_class > DEFAULT FOR TYPE pointnd USING btree AS >

[GENERAL] User defined type - analyze problem

2010-05-02 Thread Carsten Kropf
Hi *, I have a little problem with a user defined type: I constructed a type called "pointnd" which represents a multi-dimensional point. This point is subsequently used as an array type in another user defined type, like the following: CREATE TYPE document AS (words tsvector, points _pointnd);

Re: [GENERAL] User with GRANTS only on Views. Lock table on function will work?

2010-04-25 Thread Raymond O'Donnell
On 25/04/2010 13:24, Andre Lopes wrote: > Hi, > > I have a database were the users only can do operations using views, > they have not access to physical tables. But I have a function with a > lock on a physical table. Can I allow this users to run a function that > locks a physical table? You ca

[GENERAL] User with GRANTS only on Views. Lock table on function will work?

2010-04-25 Thread Andre Lopes
Hi, I have a database were the users only can do operations using views, they have not access to physical tables. But I have a function with a lock on a physical table. Can I allow this users to run a function that locks a physical table? Best Regards,

Re: [GENERAL] User action accounting

2010-03-31 Thread Guillaume Lelarge
Le 31/03/2010 07:11, Craig Ringer a écrit : > Joshua Berry wrote: >> Hello All, >> >> I have a few PHP/Clarion based applications that don't currently track >> who created and modified records. I'd like to be able to track all user >> and timestamp pairs for INSERT/UPDATEs by way of triggers. >> >>

Re: [GENERAL] User action accounting

2010-03-30 Thread Craig Ringer
Joshua Berry wrote: > Hello All, > > I have a few PHP/Clarion based applications that don't currently track > who created and modified records. I'd like to be able to track all user > and timestamp pairs for INSERT/UPDATEs by way of triggers. > > The problem is that I currently use the same role

Re: [GENERAL] User action accounting

2010-03-30 Thread Steve Atkins
On Mar 30, 2010, at 8:03 AM, Joshua Berry wrote: > Hello All, > > I have a few PHP/Clarion based applications that don't currently track who > created and modified records. I'd like to be able to track all user and > timestamp pairs for INSERT/UPDATEs by way of triggers. > > The problem is th

Re: [GENERAL] User action accounting

2010-03-30 Thread Andy Colson
On 3/30/2010 11:13 AM, Joshua Berry wrote: On Tue, Mar 30, 2010 at 10:46 AM, Andy Colson mailto:a...@squeakycode.net>> wrote: When your app/users connect to the db, do they connect as the same user, or each with a different username? The application instances each connect to the datab

Re: [GENERAL] User action accounting

2010-03-30 Thread Joshua Berry
On Tue, Mar 30, 2010 at 10:46 AM, Andy Colson wrote: > When your app/users connect to the db, do they connect as the same user, or > each with a different username? > The application instances each connect to the database with the same username. The application currently uses an ODBC connection

Re: [GENERAL] User action accounting

2010-03-30 Thread Andy Colson
On 3/30/2010 10:03 AM, Joshua Berry wrote: Hello All, I have a few PHP/Clarion based applications that don't currently track who created and modified records. I'd like to be able to track all user and timestamp pairs for INSERT/UPDATEs by way of triggers. The problem is that I currently use the

[GENERAL] User action accounting

2010-03-30 Thread Joshua Berry
Hello All, I have a few PHP/Clarion based applications that don't currently track who created and modified records. I'd like to be able to track all user and timestamp pairs for INSERT/UPDATEs by way of triggers. The problem is that I currently use the same role name for each instance of the appl

Re: [GENERAL] user variables in session

2010-03-22 Thread Merlin Moncure
On Mon, Mar 22, 2010 at 11:55 AM, Igor Shevchenko wrote: > Hi All, > > I wasn't able to find any functions which would allow me to save/fetch/remove > user variables local to pgsql session, e.g. - > > 1. select setvar('user variable name', 'user value'); > 2. select getvar('user variable name'); >

[GENERAL] user variables in session

2010-03-22 Thread Igor Shevchenko
Hi All, I wasn't able to find any functions which would allow me to save/fetch/remove user variables local to pgsql session, e.g. - 1. select setvar('user variable name', 'user value'); 2. select getvar('user variable name'); 3. select delvar('user variable name'); Is there any way to do this

Re: [GENERAL] user/grant - best practices handling permission in production system

2009-07-24 Thread Andreas Wenk
Stefano Nichele schrieb: Hi All, I have some questions for you about the best way to handle permission on a database in a production system. The final goal is to have a web application connected to the db using a single user that must run select/delete/insert/update (and maybe truncate) In m

[GENERAL] user/grant - best practices handling permission in production system

2009-07-23 Thread Stefano Nichele
Hi All, I have some questions for you about the best way to handle permission on a database in a production system. The final goal is to have a web application connected to the db using a single user that must run select/delete/insert/update (and maybe truncate) In my opinion that user should

Re: [GENERAL] user defined aggregate for percentile calculations

2009-04-06 Thread Greg Smith
On Sun, 5 Apr 2009, Kashmir wrote: would it possible at all to create a percentile-aggregate in pgres? I normally just do this right in the database without specifically accelerating it with an aggregate. Not very efficient but it works fine for reasonably sized data sets that fit into the

Re: [GENERAL] user defined aggregate for percentile calculations

2009-04-06 Thread Alvaro Herrera
Kashmir wrote: > > thx for anwering!, > > i was more looking for a percentile calculation as in > http://en.wikipedia.org/wiki/Percentile > usually i do this in perl with the 'Statistics::Descriptive' module, > but it would help me alot if i could solve this within the sql query, > and would no

Re: [GENERAL] user defined aggregate for percentile calculations

2009-04-06 Thread Kashmir
in perl at the moment... guess my sql is not smart enough, but was thinking a user defined function would be of great use :-) any more suggestions? tia! -k - Original Message From: A. Kretschmer To: pgsql-general@postgresql.org Sent: Monday, April 6, 2009 4:53:28 AM Subject: Re: [GENERA

Re: [GENERAL] user defined aggregate for percentile calculations

2009-04-06 Thread A. Kretschmer
In response to Kashmir : > > cant seem to find anything about this, > would it possible at all to create a percentile-aggregate in pgres? > any pointers? > tia > -k I'm not sure if i understand your problem, but how about: test=*# select * from percentile ; id | value +--- 1 |10

[GENERAL] user defined aggregate for percentile calculations

2009-04-05 Thread Kashmir
cant seem to find anything about this, would it possible at all to create a percentile-aggregate in pgres? any pointers? tia -k -- 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] user mode

2009-03-11 Thread Scott Marlowe
On Thu, Mar 12, 2009 at 12:01 AM, Jack W wrote: > The default user mode of PostgreSQL is single user mode. How to enable > multi-users mode? No, that's backwards. How exactly are you starting postgresql up? -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes t

[GENERAL] user mode

2009-03-11 Thread Jack W
The default user mode of PostgreSQL is single user mode. How to enable multi-users mode? Thanks. Jack

[GENERAL] user and default schema

2008-10-15 Thread Alain Roger
Hi, where can i find which user account has which default schema ? thanks a lot, -- Alain Windows XP SP3 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008

Re: [GENERAL] user and DB confusion

2008-10-13 Thread Scott Marlowe
2008/10/13 arnuld uttre <[EMAIL PROTECTED]>: >> On Mon, Oct 13, 2008 at 3:15 PM, Grzegorz Jaśkiewicz >> <[EMAIL PROTECTED]> wrote: > >> what does your pg_hba.conf says ? > > # TYPE DATABASEUSERIP-ADDRESSIP-MASK METHOD > > # IPv4-style local connections: > #hostall

Re: [GENERAL] user and DB confusion

2008-10-13 Thread arnuld uttre
> On Mon, Oct 13, 2008 at 3:15 PM, Grzegorz Jaśkiewicz > <[EMAIL PROTECTED]> wrote: > what does your pg_hba.conf says ? # TYPE DATABASEUSERIP-ADDRESSIP-MASK METHOD # IPv4-style local connections: #hostall all 127.0.0.1 255.255.255.255

Re: [GENERAL] user and DB confusion

2008-10-13 Thread Grzegorz Jaśkiewicz
what does your pg_hba.conf says ? you sure you want to use 7.4 on new installations ? that's like - years behind.

[GENERAL] user and DB confusion

2008-10-13 Thread arnuld uttre
I created a new user and then a new DB with that user, where the user is the owner: -bash-3.00$ createuser -d -P Enter name of user to add: arnuld Enter password for new user: Enter it again: Shall the new user be allowed to create more new users? (y/n) n CREATE USER [EMAIL PROTECTED] ~]$ created

Re: [GENERAL] User-Defined Variables

2008-07-10 Thread Richard Huxton
Don't forget to cc: the list Daniel Futerman wrote: What is the script trying to do (in a wider sense)? The variable is used as follows: SET @OTHER_CONCEPT_ID = (SELECT `concept_id` FROM `concept_name` where name = 'MRO' LIMIT 1); (SELECT COALESCE(f2.concept_id, @OTHER_CONCEPT_ID ) as '

Re: [GENERAL] User-Defined Variables

2008-07-10 Thread Leif B. Kristensen
On Thursday 10. July 2008, Daniel Futerman wrote: >Hi, > >Is there a quick solution to implementing user-defined variables in >PostgreSQL as they are used in MySQL? > >I have the following MySQL script which i want to implement in > Postgres (NOTE : all ` have been changed to " for Postgres use): >

Re: [GENERAL] User-Defined Variables

2008-07-10 Thread Pavel Stehule
Hello PostgreSQL doesn't support this feature. There are some techniques that you can use: http://www.pgsql.cz/index.php/PostgreSQL_SQL_Tricks#Any_other_session_variables http://www.postgresql.org/docs/8.3/static/plperl-global.html Regards Pavel Stehule 2008/7/10 Daniel Futerman <[EMAIL PROTEC

[GENERAL] User-Defined Variables

2008-07-10 Thread Daniel Futerman
Hi, Is there a quick solution to implementing user-defined variables in PostgreSQL as they are used in MySQL? I have the following MySQL script which i want to implement in Postgres (NOTE : all ` have been changed to " for Postgres use): SET @OTHER_CONCEPT_ID = (SELECT "concept_id" FROM "concept

Re: [GENERAL] User Defined C Function with minGW

2008-05-04 Thread Martijn van Oosterhout
On Fri, May 02, 2008 at 09:34:31AM -0600, Nathan Thatcher wrote: > Other people have said that pg_detoast_datum is a backend function and > shouldn't be referenced at all, but it is right there in fmgr.h which > is obviously required for creating functions under the V1 calling > convention. You us

[GENERAL] User Defined C Function with minGW

2008-05-03 Thread Nathan Thatcher
I have been creating some user defined C functions using minGW and postgreSQL 8.3. Everything works great when I use integers, timestamps, points, etc. I have compiled, linked, created, and tested multiple function and aggregates. The problem occurs when I have a text parameter and need to use PG_

Re: [GENERAL] user name and password woes

2007-12-14 Thread brian
Richard Huxton wrote: Charles Mortell wrote: The dawg that originally set up postgres 8.0 on one of our Windows 2003 servers has left the company, and I have taken it over. I need to use pg_dump on that server. When I try to, I get ‘user "Administrator" does not exist.’ Next I try ‘creat

Re: [GENERAL] user name and password woes

2007-12-14 Thread Richard Huxton
Charles Mortell wrote: The dawg that originally set up postgres 8.0 on one of our Windows 2003 servers has left the company, and I have taken it over. I need to use pg_dump on that server. When I try to, I get ‘user "Administrator" does not exist.’ Next I try ‘createuser –U postgres –W

[GENERAL] user name and password woes

2007-12-14 Thread Charles Mortell
The dawg that originally set up postgres 8.0 on one of our Windows 2003 servers has left the company, and I have taken it over. I need to use pg_dump on that server. When I try to, I get ‘user "Administrator" does not exist.’ Next I try ‘createuser –U postgres –W administrator –P’. The

Re: [GENERAL] User-Friendly TimeZone List

2007-08-15 Thread Tom Lane
Naz Gassiep <[EMAIL PROTECTED]> writes: > 1. The timezone list there isn't exactly user friendly, there are many > Etc/* timezones there, as well as others that would be potentially > confusing for users who are trying to select the timezone they are in. Feel free to filter things you don't thin

Re: [GENERAL] User-Friendly TimeZone List

2007-08-15 Thread Naz Gassiep
Do the views in 8.2 pg_timezone_abbrevs and pg_timezone_names help at all? They are where I am currently getting the authoritative list of timezones. However this list does not seem to be quite appropriate to expose users to directly. Read my original post, I've explained it a little more

Re: [GENERAL] User-Friendly TimeZone List

2007-08-15 Thread A.M.
On Aug 15, 2007, at 13:27 , Naz Gassiep wrote: Hi all, I am still, after quite some time, wrangling over the time zone system in my app. I have sorted out all the internal handling, however I am still uncertain as to what the best way to get the user to select their time zone is.

Re: [GENERAL] User-Friendly TimeZone List

2007-08-15 Thread Scott Marlowe
On 8/15/07, Naz Gassiep <[EMAIL PROTECTED]> wrote: > Hi all, > I am still, after quite some time, wrangling over the time zone > system in my app. I have sorted out all the internal handling, however I > am still uncertain as to what the best way to get the user to select > their time zone is.

[GENERAL] User-Friendly TimeZone List

2007-08-15 Thread Naz Gassiep
Hi all, I am still, after quite some time, wrangling over the time zone system in my app. I have sorted out all the internal handling, however I am still uncertain as to what the best way to get the user to select their time zone is. I was thinking of having users just select their time

Re: [GENERAL] User-Defined Types

2007-07-09 Thread Michael Glaesemann
On Jul 5, 2007, at 15:53 , David F. Johnson wrote: During the development of a database often there is a need to change a field's declaration from, say, VARCHAR(32) to, say, VARCHAR(64). Is there a simple way to make a user-defined type that is a specific declaration of a built-in type (like

[GENERAL] User-Defined Types

2007-07-09 Thread David F. Johnson
Greetings. During the development of a database often there is a need to change a field's declaration from, say, VARCHAR(32) to, say, VARCHAR(64). Having to go through and find all pertinent uses of VARCHAR(32) in the table definitions (where it may be a foreign key) and in functions (where it ma

Re: [GENERAL] user restriction

2007-06-01 Thread Martijn van Oosterhout
On Fri, Jun 01, 2007 at 11:15:30AM +0530, Ashish Karalkar wrote: > Hi All, > > I want to create a user in Postgres Database. And I want to restrict > that user with some privileges. And also I want that user should be > specific to particular database. > > He should not be able to do the followin

[GENERAL] user restriction

2007-05-31 Thread Ashish Karalkar
Hi All, I want to create a user in Postgres Database. And I want to restrict that user with some privileges. And also I want that user should be specific to particular database. He should not be able to do the following 1) Connect to any other database. 2) Connect to System da

Re: [GENERAL] User permissions/Data separation.

2007-05-27 Thread Michael Glaesemann
Conor, You're covering a few different areas here. Rather than go into depth on each one, I'll just point out a few things that came to mind while reading your post. On May 20, 2007, at 23:17 , Conor McTernan wrote: I'm using Postgres for my web app, I users that interface with the datab

[GENERAL] User permissions/Data separation.

2007-05-20 Thread Conor McTernan
I understand that this has been discussed before, but I was hoping that somebody might have some fresh ideas on the problem. I'm using Postgres for my web app, I users that interface with the database through the app. All records are classified with an industry and an occupation. Currently permis

Re: [GENERAL] User restrictions

2007-05-09 Thread John DeSoi
On May 8, 2007, at 1:10 PM, ebmb wrote: how can I make user restrictions to commands like "\du; \l; \dn". Is it possible??? No. If you a user connect directly to the database, they can query the system catalogs. So even if you somehow disabled the psql command, they could still execute s

[GENERAL] User restrictions

2007-05-09 Thread ebmb
Hi all, how can I make user restrictions to commands like "\du; \l; \dn". Is it possible??? Thanks in advance! EBMB. ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] user input during runtime

2007-02-17 Thread Joshua D. Drake
Bruce Momjian wrote: > Magnus Hagander wrote: >> Win32 will deal with the backticks Ok, but not the read && echo part. >> You can set it to the output of a variable, for example >> \set x `echo foo` >> >> but I haven't been able to trick it into actually reading something. One >> would think someth

Re: [GENERAL] user input during runtime

2007-02-17 Thread Bruce Momjian
Magnus Hagander wrote: > Win32 will deal with the backticks Ok, but not the read && echo part. > You can set it to the output of a variable, for example > \set x `echo foo` > > but I haven't been able to trick it into actually reading something. One > would think something like: > \set x `set /p Z

  1   2   3   >