Re: [GENERAL] Hex characters in COPY input

2015-02-27 Thread Melvin Call
On Fri, Feb 27, 2015 at 12:02 PM, Adam Hooper wrote: > On Fri, Feb 27, 2015 at 9:39 AM, Melvin Call wrote: >> On 2/26/15, Vick Khera wrote: >>> On Thu, Feb 26, 2015 at 9:50 PM, Melvin Call >>> wrote: >>> >>>> I get an error "ERROR: inv

Re: [GENERAL] Hex characters in COPY input

2015-02-27 Thread Melvin Call
On Fri, Feb 27, 2015 at 9:03 AM, Adrian Klaver wrote: > On 02/27/2015 06:39 AM, Melvin Call wrote: >> >> On 2/26/15, Vick Khera wrote: >>> >>> On Thu, Feb 26, 2015 at 9:50 PM, Melvin Call >>> wrote: >>> >>>> Montreal where the e is

Re: [GENERAL] Hex characters in COPY input

2015-02-27 Thread Melvin Call
On Fri, Feb 27, 2015 at 8:58 AM, Adam Hooper wrote: > On Fri, Feb 27, 2015 at 9:39 AM, Melvin Call wrote: >> On 2/26/15, Vick Khera wrote: > >>> Character code E9 is not UTF8. Don't tell Postgres you're importing UTF8 if >>> you're not. >>>

Re: [GENERAL] Hex characters in COPY input

2015-02-27 Thread Melvin Call
On 2/27/15, Adam Hooper wrote: > On Thu, Feb 26, 2015 at 9:50 PM, Melvin Call > wrote: > >> So my question is, how do I sanitize the hex character in the middle of a >> word >> to be able to copy in Montreal with an accented e? Or am I going about >> this at

Re: [GENERAL] Hex characters in COPY input

2015-02-27 Thread Melvin Call
On 2/26/15, Vick Khera wrote: > On Thu, Feb 26, 2015 at 9:50 PM, Melvin Call > wrote: > >> Montreal where the e is an accented e. The output ends up in the text >> file >> as >> Montr\xe9al, where the xe9 is a single character. When I try to copy that >>

[GENERAL] Hex characters in COPY input

2015-02-26 Thread Melvin Call
Good evening list, I am taking the output of a MySQL query and saving it into a text file for COPY input into a PostgreSQL database. The query gives me a list of addresses. One of the addresses is in Montreal, and was input using the correct spelling of Montreal where the e is an accented e. The o

Re: [GENERAL] How to determine max int

2013-11-11 Thread Melvin Call
On Mon, Nov 11, 2013 at 6:35 PM, Guy Rouillier wrote: > On 11/11/2013 7:14 PM, Melvin Call wrote: > >> Good evening, >> >> I could swear I read somewhere that the default integer size on 64-bit >> systems running 9.1 is eight bytes, or the equivalent of a bigint. B

Re: [GENERAL] How to determine max int

2013-11-11 Thread Melvin Call
On Mon, Nov 11, 2013 at 6:29 PM, John R Pierce wrote: > On 11/11/2013 4:14 PM, Melvin Call wrote: > >> I could swear I read somewhere that the default integer size on 64-bit >> systems running 9.1 is eight bytes, or the equivalent of a bigint. But >> reading through the

[GENERAL] How to determine max int

2013-11-11 Thread Melvin Call
Good evening, I could swear I read somewhere that the default integer size on 64-bit systems running 9.1 is eight bytes, or the equivalent of a bigint. But reading through the user guide it seems that it is indeed still just four-bytes. Can anyone verify that for me, or point me to a way to verify

Re: [GENERAL] Limiting/disallowing changes of certain columns

2013-11-11 Thread Melvin Call
On Mon, Nov 11, 2013 at 4:28 PM, David Johnston wrote: > Melvin Call wrote > > Hello all, > > > > I am creating a data model that contains time-dependent data. I only need > > a > > snapshot solution, where we capture the initial state of all fields in &g

[GENERAL] Limiting/disallowing changes of certain columns

2013-11-11 Thread Melvin Call
Hello all, I am creating a data model that contains time-dependent data. I only need a snapshot solution, where we capture the initial state of all fields in the record, and we then store subsequent changes as a new row in a child table. What I am looking at is creating a primary table that contai

Re: [GENERAL] Understanding database schemas

2013-08-02 Thread Melvin Call
On Fri, Aug 2, 2013 at 1:36 PM, Bosco Rama wrote: > On 08/02/13 10:56, Melvin Call wrote: > > > > If I may pigtail another related question, what is the procedure for > > allowing another user access to that schema? > > Heh. You almost have the words already: >

Re: [GENERAL] Understanding database schemas

2013-08-02 Thread Melvin Call
On Fri, Aug 2, 2013 at 12:56 PM, Melvin Call wrote: > On Fri, Aug 2, 2013 at 11:56 AM, Bosco Rama wrote: > >> On 08/02/13 09:33, Melvin Call wrote: >> > >> > $ psql -U postgres >> > >> > DROP SCHEMA IF EXISTS hrschema CASCADE; >> > DR

Re: [GENERAL] Understanding database schemas

2013-08-02 Thread Melvin Call
On Fri, Aug 2, 2013 at 11:56 AM, Bosco Rama wrote: > On 08/02/13 09:33, Melvin Call wrote: > > > > $ psql -U postgres > > > > DROP SCHEMA IF EXISTS hrschema CASCADE; > > DROP DATABASE IF EXISTS personnel; > > DROP USER IF EXISTS hr_admin; > >

[GENERAL] Understanding database schemas

2013-08-02 Thread Melvin Call
Good morning all, I am trying to get a better understanding of how schemas can be used to limit access to objects, and I seem to be failing miserably. Can anyone point me to documentation about, or a decent tutorial on, schema usage for access separation? I have tried to understand through the use

Re: [GENERAL] Distributed systems and primary keys

2013-07-12 Thread Melvin Call
013/7/12 Joshua D. Drake > >> >> On 07/12/2013 07:23 AM, Melvin Call wrote: >> >>> Hello list, >>> >>> Can anyone point me to some reading material on how auto-generated >>> sequence primary keys are handled on distributed systems? I think th

Re: [GENERAL] Distributed systems and primary keys

2013-07-12 Thread Melvin Call
On Fri, Jul 12, 2013 at 9:46 AM, Joshua D. Drake wrote: > > On 07/12/2013 07:23 AM, Melvin Call wrote: > >> Hello list, >> >> Can anyone point me to some reading material on how auto-generated >> sequence primary keys are handled on distributed systems? I thin

[GENERAL] Distributed systems and primary keys

2013-07-12 Thread Melvin Call
Hello list, Can anyone point me to some reading material on how auto-generated sequence primary keys are handled on distributed systems? I think the advice used to be to use GUIDs, but I thought I read somewhere that PostgreSQL now assigns a pool of numbers to each node when a sequence is implemen

Re: [GENERAL] Circular references

2013-06-21 Thread Melvin Call
; HTH, > > Ladislav Lenart > > > On 21.6.2013 05:08, Tom Lane wrote: > > Melvin Call writes: > >> I was given a dump of an existing remote schema and database, and the > >> restore on my local system failed. Looking into it, I found a circular > >> p

Re: [GENERAL] Circular references

2013-06-21 Thread Melvin Call
_role_id; Type: FK CONSTRAINT; Schema: project; Owner: projlead -- ALTER TABLE ONLY "user" ADD CONSTRAINT f_key_user_user_role_id FOREIGN KEY (user_role_id) REFERENCES user_role(user_role_id); On Thu, Jun 20, 2013 at 10:08 PM, Tom Lane wrote: > > Melvin Call writes: > > I

[GENERAL] Circular references

2013-06-20 Thread Melvin Call
I was given a dump of an existing remote schema and database, and the restore on my local system failed. Looking into it, I found a circular parent-child/child-parent relationship, and I don't believe this existing structure is viable. To summarize, the organization entity has an attribute of creat

Re: [GENERAL] Passing a WHERE clause by trigger to a function

2013-06-04 Thread Melvin Call
the wrong way. Thanks a million! On Tue, Jun 4, 2013 at 7:47 AM, David Johnston wrote: > Melvin Call wrote > > But I still have a question in that I'd like to know if I can pass the > > WHERE clause to the function so it can examine the query? Or will I have > > to >

Re: [GENERAL] Passing a WHERE clause by trigger to a function

2013-06-04 Thread Melvin Call
rning experience and ignorance is just a lack of knowledge. Failure to try to obtain missing knowledge is an entirely different thing altogether... Regards, Melvin On Mon, Jun 3, 2013 at 4:54 PM, David Johnston wrote: > Melvin Call wrote > > DELETE FROM staff > > WHERE last = &#x

Re: [GENERAL] Passing a WHERE clause by trigger to a function

2013-06-03 Thread Melvin Call
department WHERE department_name = 'IT' AND company_id = (SELECT company_id FROM company WHERE company_name = 'Company2')), (SELECT role_id FROM role WHERE role_title = 'System admin')), ((SELECT person_id FROM person WHERE person_lastname = 'Doe6'), (SEL

[GENERAL] Passing a WHERE clause by trigger to a function

2013-06-03 Thread Melvin Call
Hello list, I am playing around with views and INSTEAD OF triggers, and have run across an interesting problem that I can't seem resolve, so I figured it was time to expose my ignorance to the whole world. I have several tables: person, consisting of a person's name and address, with a person_id

Re: [GENERAL] New role, no database

2013-05-23 Thread Melvin Call
On 5/23/13, Scott Marlowe wrote: > On Thu, May 23, 2013 at 3:01 PM, Melvin Call > wrote: >> Hello, >> >> I have a question for which I am unable to find an answer in the >> documentation, if y'all don't mind, I will ask here and hope for an >>

Re: [GENERAL] New role, no database

2013-05-23 Thread Melvin Call
That works like a charm. Thanks Alvaro! On 5/23/13, Alvaro Herrera wrote: > Melvin Call escribió: >> Hello, >> >> I have a question for which I am unable to find an answer in the >> documentation, if y'all don't mind, I will ask here and hope for an >>

[GENERAL] New role, no database

2013-05-23 Thread Melvin Call
Hello, I have a question for which I am unable to find an answer in the documentation, if y'all don't mind, I will ask here and hope for an answer. After installing PostgreSQL and logging in as the admin user of postgres, I have created a new user with the CREATEDB privilege. How does that user l