Skip site navigation (1) Skip section navigation (2)

Re: I'm very confused.

From: "Jasbinder Singh Bali" <jsbali(at)gmail(dot)com>
To: "Brant Fitzsimmons" <brant(at)bfcomputerconsulting(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: I'm very confused.
Date: 2007-01-17 07:14:15
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
Please attach a snippet of your python script and lets see what are
you doing there.
That might make things easy.

On 1/17/07, Brant Fitzsimmons <brant(at)bfcomputerconsulting(dot)com> wrote:
> Hash: SHA1
> Hi there,
> I think that this may be my first post to this list so be gentle.
> I'm having a very strange problem (to me) and I hope that someone can
> shed some light on what I'm not seeing.
> I created a database and table from the command line using: sudo su
> postgres createdb test
> That worked fine and created the stated table.
> I then logged in using: sudo su postgres psql test
> Again, that worked fine.
> I created a table from the prompt using: create table users (userID
> serial, userName varchar(32), firstName varchar(32), lastName
> varchar(64), email varchar(128));
> The table was successfully created.  So good so far.  Don't mind the
> values of the varchar's; this is purely for testing.
> I then added a primary key to the table using:  alter table users add
> primary key (userId);
> Again, it worked.
> Here's where it starts to get weird.
> I inserted data into the table using: insert into users (username,
> firstName, lastName, email) values ('bfitzsimmons', 'Brant',
> 'Fitzsimmons', 'brant(at)bfcomputerconsulting(dot)com');
> It went in properly and I was able to select the inserted data without
> any problems (select * from users;).
> I then wrote a python script to insert and select data from the
> table.  The script is able to insert and retrieve data without any
> problems...*but*...from the console I can't retrieve any of the
> records inserted by the script.
> Records that are entered at the console show up when I do a select
> with the script, but not the other way around.  I have tried to the
> RTFM as much as possible, but I'm still lost as to why while accessing
> the same table I can't access the data manipulated by the script.  I
> don't know if it has anything to do with tablespaces or what, but I'm
> really starting to get frustrated.
> I'm from a MySQL background and I'm completely stumped as to how you
> can, through a script, insert data into a database *created at the
> console* and not be able to select that data from the console.  I know
> it's there taking up space on my machine, and I can select it from the
> script, but I can't manipulate it in any way outside of that.
> Any thoughts?
> - --
> Brant Fitzsimmons
> brant(at)bfcomputerconsulting(dot)com
> - -------------------------------------------------------------------
> "Strange times are these in which we live when the old and the
> young are taught falsehoods in the schools of learning. And the one
> man that dares to tell the truth is called at once a lunatic and
> a fool."
>                            -Plato
> Version: GnuPG v1.4.3 (GNU/Linux)
> Comment: Using GnuPG with Mozilla -
> iD8DBQFFrcVlDpzwx2t8E5gRAv6BAJ9It2xCVv+f+iYridluQxQav7pv4wCffNQX
> fqy/kGwKA1RCcWkmuc3r8T4=
> =7liR
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings

In response to


pgsql-novice by date

Next:From: Brant FitzsimmonsDate: 2007-01-17 07:57:06
Subject: Re: I'm very confused.
Previous:From: Alan HodgsonDate: 2007-01-17 06:59:19
Subject: Re: I'm very confused.

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group