Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by rycamor

  1. rycamor

    FTP Recommendations?

    proftpd, at /usr/ports/ftp/proftpd is my recommendation, although honestly, making security as a requirement for FTP is kind of begging the question. FTP by default is not secure. If you want encrypted FTP, then you should just have the sshd daemon running, which will handle connections in...
  2. rycamor

    datatype conversion in postgresql 7.4.1

    Yes, 8.0 has greatly expanded your options for ALTER TABLE, which are not available for 7.4. But, Postgresql has a very complete set of functions to format data of any type: http://www.postgresql.org/docs/7.4/interactive/functions-formatting.html Also, PostgreSQL has a very convenient postfix...
  3. rycamor

    Does PostgreSQL have an enum data type?

    There is no datatype ENUM in PostgreSQL, but it is quite easy to handle this with a CHECK constraint -- http://www.postgresql.org/docs/8.0/interactive/ddl-constraints.html Often it is a better design choice to use foreign key constraints with validation tables to accomplish this sort of...
  4. rycamor

    Postgresql performance in Linux vs FreeBSD

    I would focus on that fact first, indeed foremost. FreeBSD takes the most conservative approach to making sure your data stays the way you stored it. In my experience, Linux has never been as stable or robust in storage. Also, you will find that a large percentage of PostgreSQL users and...
  5. rycamor

    How to import data (Cisco PIX) into PostgreSQL database?

    Well, what columns would you *like* to separate this data into? Split the above example into the appropriate columns with a "|" for now, so we can get an idea how you would like to design your table. Basically, unless you have additional choices in how to output the file in the PIX, you will...
  6. rycamor

    PHP with OOP - Must I require the Class???

    You might be interested to note that PHP5 now has 'autoload' capability: http://us4.php.net/manual/en/language.oop5.autoload.php Basically, if you have a standard naming convention for your classes, then you can define one function to handle the automatic loading, and anywhere you use the...
  7. rycamor

    Problem : array of table%ROWTYPE

    I probably don't understand. Exactly how do you want to "move element in these array"? What are you trying to accomplish? Are you saying the array is composed of multiple rows from the table, or composed of individual elements from *one* table row? Maybe if you posted that part of your PL/SQL...
  8. rycamor

    Indexing int8 does not work, here is why and how! (must read)

    Yes, it is simply a matter of typecasting, and I'm glad it is solved in version 8.0. Another way to fix the queries for indexes on different int types is to explicitly cast the constant to the right type: select * from product where item_number=1234::int8
  9. rycamor

    Is PostgreSQL a 64-bit database?

    PostgreSQL can be compiled in 64-bit mode an any of the 64-bit architectures in ceco's link. Exactly what that means for performance/size is not always an easy answer. In other words, for some cases, the performance difference between a 32-bit and a 64-bit system might not be that great. Also...
  10. rycamor

    linux not recognised

    Yes, there is a lot of confusion in the computing world anyway, and the consumer end of computing is where confusion is the heaviest. As much as it pains me to say it, I think LindowsOS is probably the best chance the Linux world has to hit the consumer market. And that's because they don't...
  11. rycamor

    advice needed

    Imap mail servers with advanced systems like SquirrelMail have some advantages. But, if you are already set up with Apache/PHP and sendmail, and want a very simple system, check out http://webgadgets.com/phpost/ ------------------------------------------- My PostgreSQL FAQ --...
  12. rycamor

    Hi, In my table I have a primary k

    Using a function like MAX on a varchar type implies all sorts of future problems. Why don't you just use a real autoincrement field as your primary key, and create another unique key with your naming convention above, if it is important for human-readable reasons? But anyway, on to the full...
  13. rycamor

    date difference in postgresql

    Well, I'm not completely sure of the logic you are trying to achieve here. Actually, I think you don't need a self join at all. If you just want to select everything that falls withing the past 12 months it would look like: SELECT reviewerid, proposalid, dt, (NOW()-dt)::INTERVAL AS timespan...
  14. rycamor

    One more time for storing images at table

    The answer is: no, you don't need lo_import and lo_export. It is possible to store images and other files using the BYTEA datatype, by just sending the stream from the browser file upload to the variable that will fill that column. If you are doing this with PHP, you should use the...
  15. rycamor

    date difference in postgresql

    What do you mean 'I tried interval'? Did you write a query with a self-join, casting the difference between dates to interval and then limiting to under 12 months? (That's how I would do it). If not, then exactly what query did you try? In fact, INTERVAL columns and/or casting date differences...

Part and Inventory Search

Back
Top