Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [postgresql]

PostgreSQL is an open-source, relational database management system (RDBMS) available for all major platforms, including Linux, UNIX, Windows and OS X. Mention your version of Postgres when asking questions. Consider dba.stackexchange.com for questions concerning the administration or advanced features.

postgresql
5 votes
2 answers
5k views

How do you debug functions with postgres?

I'm using pgAdmin III 1.8.4 and finding it a harsh mistress. When writing stored procedures (functions), there's no query compilation. So I have no idea if my function will work until I call it. How ...
Tristan Warner-Smith's user avatar
8 votes
2 answers
4k views

Determine cluster directory from Postgres service

Is it possible to determine the cluster directory being used by a Postgres server, from the server itself -- i.e. the service, (under Windows) was started by something like: C:\foo\postgres.exe -D "D:...
Vincent Marchetti's user avatar
4 votes
3 answers
4k views

Programatically finding the number of rows affected by a Postgres COPY

I'm using Postgres 8.2 and the associated libpq library for ANSI C. I've skimmed the documentation and not found something that would give me that specific information. In the "COPY" section of the ...
Joshua Berry's user avatar
  • 2,320
-1 votes
4 answers
2k views

Best way to create a unique number for each many to many relationship

I have a table of Students and a table of Courses that are connected through an intermediate table to create a many-to-many relationship (ie. a student can enroll in multiple courses and a course can ...
gerdemb's user avatar
  • 11.4k
1 vote
2 answers
3k views

Modify postgresql "list" aggregate to remove duplicates

One of my favorite postgres aggregates is "list", attributed to "Chris Rohlfs in the idocs" according to the scanty evidence I can find on the web. CREATE FUNCTION comma_cat (text, text) RETURNS ...
Jenn D.'s user avatar
  • 1,045
-1 votes
1 answer
376 views

Does plperlu reload Perl modules if they change? [duplicate]

If I wrote something in plperlu, and it used a Perl module (e.g. MyModule::Foo), when would that module be reloaded? Does it keep track of them like mod_perl's Apache2::Reload, so that a touch will ...
Kev's user avatar
  • 16.2k
26 votes
6 answers
17k views

Polymorphism in SQL database tables?

I currently have multiple tables in my database which consist of the same 'basic fields' like: name character varying(100), description text, url character varying(255) But I have multiple ...
Patrick Glandien's user avatar
6 votes
5 answers
6k views

Database replication for redundancy using a free database and a Java with Spring & Hibernate web application

I have this in mind: On each server: (they all are set up identically) A free database like MySQL or PostgreSQL. Tomcat 6.x for hosting Servlet based Java applications Hibernate 3.x as the ORM tool ...
user avatar
3 votes
1 answer
309 views

Does PostgreSQL keep its pl* interpreters loaded persistently?

If I wrote something in plperlu, when would that module be reloaded? Every time the function ran? The first time it ran? Does the Perl DLL get unloaded if it hasn't been used in a while, and then ...
Kev's user avatar
  • 16.2k
1 vote
2 answers
3k views

How do I find all references from other tables to a specific row?

So I have an address table that is shared among various other tables, such as schools, parks, churches, etc. Schools, parks, etc all foreign key to a row in address. What I'm wondering is, if I ...
sheats's user avatar
  • 34.2k
31 votes
2 answers
8k views

How do you do mysqldump in postgresql?

And how do I restore from my dump back to the db?
flybywire's user avatar
  • 270k
0 votes
2 answers
376 views

Read number of columns and their type from query result table (in C)

I use PostgreSQL database and C to connect to it. With a help from dyntest.pgc I can access to number of columns and their (SQL3) types from a result table of a query. Problem is that when result ...
kliketa's user avatar
  • 1,256
6 votes
4 answers
13k views

PostgreSQL management and monitoring

Moving from Oracle to PostgreSQL, what (preferably free/OSS) software/tools are available that replace Oracle Enterprise Manager? I'm aware of pgAdmin, as well as some tools bundled into EnterpriseDB'...
Jacob's user avatar
  • 1,671
17 votes
4 answers
20k views

How to know a timezone of a timestamp in postgresql 8.3

I'm using postgresql 8.3 and i would like to know the timezone of a particular timestamp (a column in a table). In the documentation i've found the keyword "timezone" But i don't understand how to ...
semantic-dev's user avatar
  • 1,113
36 votes
17 answers
102k views

PHP not loading php_pgsql.dll on Windows

PHP 5.2.8 is refusing to load php_pgsql.dll, with the following error: Warning: PHP Startup: Unable to load dynamic library 'D:\PHP\ext\php_pgsql.dll' - The specified module could not be found. in ...
Ross's user avatar
  • 46.8k

15 30 50 per page