.plus.com]
Sent: Friday, March 11, 2011 7:32 PM
To: python-list@python.org
Subject: Re: Inserting record into postgresql database
On 11/03/2011 22:08, Meszaros, Stacy wrote:
> Hello all,
>
> I am using python 2.6 and the psycopg2 module for the postgres connection
> The following code i
On 11/03/2011 22:08, Meszaros, Stacy wrote:
Hello all,
I am using python 2.6 and the psycopg2 module for the postgres connection
The following code is supposed to insert a record into a table with a bytea
field. (bytearray)
I am having difficulty getting to field inserted properly. The snippet
Hello all,
I am using python 2.6 and the psycopg2 module for the postgres connection
The following code is supposed to insert a record into a table with a bytea
field. (bytearray)
I am having difficulty getting to field inserted properly. The snippet below
inserts the first 8 bit hex value, whi
Hello.
This is the full work version.
Do yuo have:
- Pyton, PostgreSQL, Psycopg2
- PostgreSQL dababase named "MyDATABASE" with table named "phonebook"
- Table "phonebook" have this columns: "lastname" [TEXT datatype] and
"c2image" [BYTEA datatype]
- Do you have an jpeg file named "sun.jpg" on c:/
On Dec 4, 2010, at 2:32 PM, D'Arcy J.M. Cain wrote:
> On Sat, 4 Dec 2010 19:12:08 +
> starglider develop wrote:
>> I need to backup a postgresql database from python withour using pg_dump!
>> Is any way of doing that?
>
> Probably. I guess the first question
On Sat, 4 Dec 2010 19:12:08 +
starglider develop wrote:
> I need to backup a postgresql database from python withour using pg_dump!
> Is any way of doing that?
Probably. I guess the first question is why can't you use pg_dump?
That might give us a clue as to the requirements.
Hi,
I need to backup a postgresql database from python withour using pg_dump!
Is any way of doing that?
Thank you in advance for your help.
Zorze
--
http://mail.python.org/mailman/listinfo/python-list
On Aug 23, 9:37 am, Julia Jacobson wrote:
> How can I assign the result of a SQL query to a variable?
> The following code snippet doesn't work:
> query_result=cur.execute("SELECT column_name FROM table_name WHERE
> my_variable = 'my_value'",)
>
> > Thomas Jollans wrote:
>
>
>
> > * get the recor
Julia Jacobson wrote:
> How can I assign the result of a SQL query to a variable?
> The following code snippet doesn't work:
> query_result=cur.execute("SELECT column_name FROM table_name WHERE
> my_variable = 'my_value'",)
To retrieve an image from a table "images" by its name you could do
(unt
How can I assign the result of a SQL query to a variable?
The following code snippet doesn't work:
query_result=cur.execute("SELECT column_name FROM table_name WHERE
my_variable = 'my_value'",)
> Thomas Jollans wrote:
* get the record you're interested in
--
http://mail.python.org/mailman/li
g python,
> >>
> >> For the insertion of pictures into my PostgreSQL database [with table
> >> foo created by SQL command "CREATE TABLE foo (bmp BYTEA)], I've written
> >> the following script:
> >>
> >> #!/usr/bin/python
> >
res into my PostgreSQL database [with table
foo created by SQL command "CREATE TABLE foo (bmp BYTEA)], I've written
the following script:
#!/usr/bin/python
import psycopg2
try:
conn = psycopg2.connect("dbname='postgres' user='postgres'
host='localhost
Julia Jacobson wrote:
> Hello everybody out there using python,
>
> For the insertion of pictures into my PostgreSQL database [with table
> foo created by SQL command "CREATE TABLE foo (bmp BYTEA)], I've written
> the following script:
>
> #!/usr/bin/python
>
On Sat, 21 Aug 2010 22:58:00 +0200
Julia Jacobson wrote:
> For the insertion of pictures into my PostgreSQL database [with table
> foo created by SQL command "CREATE TABLE foo (bmp BYTEA)], I've written
> the following script:
>
> #!/usr/bin/python
> import
Hello everybody out there using python,
For the insertion of pictures into my PostgreSQL database [with table
foo created by SQL command "CREATE TABLE foo (bmp BYTEA)], I've written
the following script:
#!/usr/bin/python
import psycopg2
try:
conn = psycopg2.connect("d
Hi,
I just need to know is there any existing module or library that could be
used for storing pickle data fields into a Postgresql server database , I
have found some answers to this about using with the SQlite3 for Python 2.5,
but is it possible for Postgresql Server. ?
Thanks
Regards
Jaideep
On Oct 22, 8:43 pm, Erik Jones <[EMAIL PROTECTED]> wrote:
> On Oct 22, 2007, at 8:19 PM, David Michael Schruth, wrote:
>
>
>
> > Hi,
>
> > I am sort of in a jam here. I am using the PsycoPG2 library to read
> > data out of a windows XP based PostGIS / Post
On Oct 22, 2007, at 8:19 PM, David Michael Schruth, wrote:
> Hi,
>
> I am sort of in a jam here. I am using the PsycoPG2 library to read
> data out of a windows XP based PostGIS / PostGreSQL database but I am
> apparently unable to write (update or insert) even though I am
Hi,
I am sort of in a jam here. I am using the PsycoPG2 library to read
data out of a windows XP based PostGIS / PostGreSQL database but I am
apparently unable to write (update or insert) even though I am able to
read (select)
I am using PsycoPG2 2.0.6 (psycopg2-2.0.6.win32-py2.5-pg8.2.4
On Aug 2, 1:55 am, Acm <[EMAIL PROTECTED]> wrote:
> I am working with Python 2.5 and Postgresql 8.2.4.
>
> I would like to know how to perform the backup and restore operations
> on postgresql through a python API (e.g. psycopg2).
>
> Thank you.
I don't know much about postgres, but here's what m
I am working with Python 2.5 and Postgresql 8.2.4.
I would like to know how to perform the backup and restore operations
on postgresql through a python API (e.g. psycopg2).
Thank you.
--
http://mail.python.org/mailman/listinfo/python-list
Michele Simionato ha scritto:
> Paolo wrote:
> > Ciao a tutti, sto cercando di implementare un applicazione che si
> > interfaccia con postgresql(8.1), utilizzando Psycopg2, in ambiente
> > windows (python versione 2.5). Ho installato Psycopg2 e provando
> > solamente fare: import psycopg mi rito
Paolo wrote:
> Ciao a tutti, sto cercando di implementare un applicazione che si
> interfaccia con postgresql(8.1), utilizzando Psycopg2, in ambiente
> windows (python versione 2.5). Ho installato Psycopg2 e provando
> solamente fare: import psycopg mi ritorna il seguente errore:
>
> import ps
Ciao a tutti, sto cercando di implementare un applicazione che si
interfaccia con postgresql(8.1), utilizzando Psycopg2, in ambiente
windows (python versione 2.5). Ho installato Psycopg2 e provando
solamente fare: import psycopg mi ritorna il seguente errore:
import psycopg
ImportError: No mod
>> Say I have three tables.
>
> Only three?
Well, yeah, OK, it's more than that, but after years of being worn away
by "Post a minimal example" requests on comp.text.tex, a minimal
example is what you got...
> Something like {untested... Might need to do a subselect for the
> sec
Martin Christensen said:
>SR> Scenario: I have a python script which creates web page listing
>SR> all books in the database, and all authors for each book. My
>SR> python script does essentially three things:
>
>SR> 1. retrieve a list of all book_ids and book_titles.
>
>SR> 2. for each book_id, q
In article <[EMAIL PROTECTED]>,
"SR" <[EMAIL PROTECTED]> wrote:
>The script works fine, if a little slow. I think that's because if I
>have 50 books in my database, my script performs 51 database queries (1
>for all book names; then 1 for each book)
If your database is that small, why bother wit
In article <[EMAIL PROTECTED]>,
SR <[EMAIL PROTECTED]> wrote:
>As a starter project for learning Python/PostgreSQL, I am building a
>Books database that stores information on the books on my bookshelf.
>
>Say I have three tables.
>
>Table "books" contains rows for book_id, title, subtitle, ISBN.
>
> "SR" == <[EMAIL PROTECTED]> writes:
SR> Scenario: I have a python script which creates web page listing
SR> all books in the database, and all authors for each book. My
SR> python script does essentially three things:
SR> 1. retrieve a list of all book_ids and book_titles.
SR> 2. for each
SR wrote:
> As a starter project for learning Python/PostgreSQL, I am building a
> Books database that stores information on the books on my bookshelf.
>
> Say I have three tables.
>
> Table "books" contains rows for book_id, title, subtitle, ISBN.
>
> Table "authors" contains rows for author_id,
As a starter project for learning Python/PostgreSQL, I am building a
Books database that stores information on the books on my bookshelf.
Say I have three tables.
Table "books" contains rows for book_id, title, subtitle, ISBN.
Table "authors" contains rows for author_id, author surname, author
f
31 matches
Mail list logo