[SQL] how to store a query, that results in a table
thank you jie Liang for your response, but my problems are: 1. How to store a query in the database. 2. How to give a parameter from outside of database, for example: select * from table1 where row1 = my_parameter_outside. Give me an example please. begin:vcard n:brito;nelson x-mozilla-html:FALSE adr:;; version:2.1 email;internet:[EMAIL PROTECTED] x-mozilla-cpt:;28480 fn:nelson brito end:vcard
[SQL] How to create secondary key!!
good day, i'm using pgAdmin II as the remote client, after importing the text file to postgresql database; i'm start trying to find the way to create the primary key and secondary key. unfortunely, under the pgAdmin II there aren't any tools to do that. However i managed to fine the way to create the primary key by using the index function but i still cannot create the secondary key in my database. please advise me! Best Regards, /'"`\ ( - - ) --oooO--(_)--Oooo----- Nelson Yong [EMAIL PROTECTED] THE BUILDING MATERIALS PEOPLE ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
[SQL] Using INET types in prepared statements
Hi, I am trying to create a prepared statement in JAVA via JDBC and one of the parameters I need to set in the SQL statement is of type INET. As there is no setInet() method how do I pass in the INET value into the sql statement? I have tried this: " WHERE b.ip = ?::inet" But I get "org.postgresql.util.PSQLException: ERROR: cannot cast type character varying to inet" I also tried " WHERE b.ip = ?" And I get "org.postgresql.util.PSQLException: ERROR: cannot cast type character varying to inet" I really want to use prepared statement as I have to run this SQL statement over and over and it is supposed to be more efficient. Can anyone help? Cheers, Nelson Disclaimer : The contents of this e-mail including any attachments are intended only for the person or entity to which this e-mail is addressed. If you are not, or believe you may not be, the intended recipient, please advise the sender immediately by return e-mail, delete this e-mail and destroy any copies. Tenix does not warrant nor guarantee that this email communication is free from errors, virus, interception or interference.
[SQL] Re: [GENERAL] How to store gif or jpeg? Thanks!
Hello! When you store data with PostgreSQL as BLOBs it doesn't matter if it's an image, sound or whatever - everything works in the same way. So you should use the image type that better represents your images. You can find some information about how to use it below: psql: (see the commands \lo_[something] ) http://www.postgresql.org/devel-corner/docs/postgres/app-psql.html client interfaces: http://www.postgresql.org/devel-corner/docs/postgres/programmer-client.html Nelson. Maurizio Ortolan wrote: > Hello! > > In your opinion, which is the best > way to store images (gif o jpg) > with PostgreSQL? > > Where can I find an easy example? > > Many thanks to all of you! > CIAO! > MAURIZIO > > *** > ** Happy surfing on THE NET !! ** > ** Ciao by ** > ** C R I X 98 ** > *** > AntiSpam: rimuovere il trattino basso > dall'indirizzo per scrivermi... > (delete the underscore from the e-mail address to reply) > > ---(end of broadcast)--- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/users-lounge/docs/faq.html ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
