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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: ceco
  • Order by date
  1. ceco

    How can I use php to connect to a postgresql table

    http://bg2.php.net/manual/en/ref.pgsql.php http://bg2.php.net/manual/en/ref.pdo.php http://bg2.php.net/manual/en/ref.pdo-pgsql.php (I do not know ASP to be usable under linux, but I am not quite aware of the mono project)
  2. ceco

    Help Importing datafile

    you can restor postgres DB two ways dump / restore (as already pointed out) and if you have the data files, then you need the same major postgres version (for the same computer arcitecture) the way you describe, the files you have, do not look any like postgres files at all
  3. ceco

    Create table with comment

    you can comment objects http://www.postgresql.org/docs/8.2/interactive/sql-comment.html but not with the create statement CREATE TABLE "test" ( "test" CHAR(36) NOT NULL, PRIMARY KEY ("test") ); COMMENT ON TABLE "test" IS 'this is realy test table'; COMMENT ON COLUMN "test"."test" IS 'this...
  4. ceco

    Functions and Transactions , need workaround

    maybe safe points can do the thing
  5. ceco

    Poor VIEW performance

    it is pretty large query, I don't have time to dive in to it, but at first glance, you can try to use UNION ALL instead of just UNION (if you are sure that there are no duplicates)
  6. ceco

    Drop column only if it exists

    if you are using recent version of postgresql and using plain SQL, just enclose it with savepoint test@ws-dev:5432 test=> ALTER TABLE tbl DROP field; ALTER TABLE test@ws-dev:5432 test=*> SAVEPOINT test_1; SAVEPOINT test@ws-dev:5432 test=*> ALTER TABLE tbl DROP field; ERROR: column "field" of...
  7. ceco

    what is the problem in this function

    if only one of the parameters is null then the whole concatenation will return null by the way why do you construct this like this, and not just execute it, at first glance I don't see a reason
  8. ceco

    These results are mathematically impossible!

    then what is this returing select count(*) from ( select distinct clientid from tbvisits where date > '2004-05-29' and date <= '2005-05-29' EXCEPT select distinct clientid from tbvisits where date > '2005-05-29' and date <= '2005-06-29' ) AS tmp;
  9. ceco

    Relation &quot;&lt;table&gt;&quot; Does Not Exist

    in which schema is this table, and what is your search_path (the later I suppose is public)
  10. ceco

    Could not connect to server...

    this file exists when the standard version the one that comes with ubuntu is started, are you sure you see it in the process list actually, on ubuntu the start script is /etc/init.d/postgresql-8.2
  11. ceco

    Could not connect to server...

    as most of the services in ubuntu you start it with /etc/init.d/postgres start
  12. ceco

    help in debugging querries

    if you are talking about plpgsql functions use raise notice http://www.postgresql.org/docs/8.2/interactive/plpgsql-errors-and-messages.html
  13. ceco

    Review queries performed on a postgres DB

    http://www.postgresql.org/docs/8.2/interactive/runtime-config-logging.html see here it is for a newer version you can find it for your version too
  14. ceco

    Query performance

    I would suggest creating index on snp_allel_chr_20_kora_pt6(snd_ip) WHERE NOT a.allele_1='-' and then ordering BY a.snd._ip not like you do now with b.snd_ip
  15. ceco

    Query performance

    sory this is not the problem, you probaly have turned this syntax on from postgresql.conf
  16. ceco

    Query performance

    as a first tip consider instead of NOT b.snp_id=null to use b.snp_id IS NOT NULL I suppose this query doesn't even return the expected result
  17. ceco

    Some PostgreSQL commands, IMPORTANT

    you can use the information schema http://www.postgresql.org/docs/8.2/interactive/information-schema.html you can see phpPgAdmin how has done this things
  18. ceco

    effect of tables with large numbers of columns

    I haven't tried tables with so much tables, but it doesn't matter how many indexes a table has, if they are not proper
  19. ceco

    Cannot get &quot;WHERE&quot; clause in query to work

    probably you've created the table with UPPER CASE names so now you have to do WHERE "ID" = 1
  20. ceco

    ORDER BY problem with JOINs

    actually at first glance I don't see any reason, but why do you do that SELECT op.quantitySold, ..... LEFT OUTER JOIN (SELECT prod_id, SUM(quantity) AS quantitySold FROM orders_prods WHERE order_date > '$dateSevenDaysAgo' GROUP BY prod_id) AS op ON op.prod_id = p.prod_id instead of SELECT...

Part and Inventory Search

Back
Top